use errors.New when not formatting

This commit is contained in:
Joel Wetzell
2025-12-23 15:00:30 -06:00
parent 76583b1fb8
commit ff1949ce69
49 changed files with 245 additions and 229 deletions

View File

@@ -3,7 +3,7 @@ package processor
import (
"bytes"
"context"
"fmt"
"errors"
"text/template"
"github.com/jwetzell/showbridge-go/internal/config"
@@ -39,13 +39,13 @@ func init() {
tmpl, ok := params["template"]
if !ok {
return nil, fmt.Errorf("string.create requires a template parameter")
return nil, errors.New("string.create requires a template parameter")
}
templateString, ok := tmpl.(string)
if !ok {
return nil, fmt.Errorf("string.create template must be a string")
return nil, errors.New("string.create template must be a string")
}
templateTemplate, err := template.New("template").Parse(templateString)