Skip to content

Commit

Permalink
fix fmt and typo
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
  • Loading branch information
ukane-philemon committed Feb 22, 2025
1 parent c5015c8 commit c531e3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/dcrdata/internal/explorer/templates.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2024, The Decred developers
// Copyright (c) 2018-2025, The Decred developers
// Copyright (c) 2017, The dcrdata developers
// See LICENSE for details.

Expand Down Expand Up @@ -78,14 +78,14 @@ func (t *templates) reloadTemplates() error {
if errorStrings == nil {
return nil
}
return fmt.Errorf(strings.Join(errorStrings, " | "))
return fmt.Errorf("%s", strings.Join(errorStrings, " | "))
}

// execTemplateToString executes the associated input template using the
// supplied data, and writes the result into a string. If the template fails to
// execute or isn't found, a non-nil error will be returned. Check it before
// writing to theclient, otherwise you might as well execute directly into
// your response writer instead of the internal buffer of this function.
// writing to the client, otherwise you might as well execute directly into your
// response writer instead of the internal buffer of this function.
func (t *templates) execTemplateToString(name string, data interface{}) (string, error) {
temp, ok := t.templates[name]
if !ok {
Expand Down

0 comments on commit c531e3f

Please sign in to comment.