diff --git a/template/template.go b/template/template.go index b85caac..efa299d 100644 --- a/template/template.go +++ b/template/template.go @@ -8,9 +8,10 @@ package template import ( "fmt" - "io/ioutil" + "io" "net/http" "net/url" + "os" "strings" "github.com/flowchartsman/handlebars/v3" @@ -33,14 +34,14 @@ func Render(template string, payload interface{}) (s string, err error) { defer res.Body.Close() - out, err := ioutil.ReadAll(res.Body) + out, err := io.ReadAll(res.Body) if err != nil { return s, fmt.Errorf("failed to read: %w", err) } template = string(out) case "file": - out, err := ioutil.ReadFile(u.Path) + out, err := os.ReadFile(u.Path) if err != nil { return s, fmt.Errorf("failed to read: %w", err) }