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"
"net/http"
"text/template"
@@ -50,25 +50,25 @@ func init() {
method, ok := params["method"]
if !ok {
return nil, fmt.Errorf("http.request.create requires a method parameter")
return nil, errors.New("http.request.create requires a method parameter")
}
methodString, ok := method.(string)
if !ok {
return nil, fmt.Errorf("http.request.create url must be a string")
return nil, errors.New("http.request.create url must be a string")
}
url, ok := params["url"]
if !ok {
return nil, fmt.Errorf("http.request.create requires a url parameter")
return nil, errors.New("http.request.create requires a url parameter")
}
urlString, ok := url.(string)
if !ok {
return nil, fmt.Errorf("http.request.create url must be a string")
return nil, errors.New("http.request.create url must be a string")
}
urlTemplate, err := template.New("url").Parse(urlString)