diff --git a/web/routes.go b/web/routes.go index 23a9bbb..ea9929d 100644 --- a/web/routes.go +++ b/web/routes.go @@ -27,7 +27,6 @@ import ( "fmt" "io" "io/fs" - "io/ioutil" "log" "net/http" "net/url" @@ -140,7 +139,7 @@ func serveOrReverse(forced_url string, cfg *config.Config) gin.HandlerFunc { } } - v, _ := ioutil.ReadAll(resp.Body) + v, _ := io.ReadAll(resp.Body) v2 := strings.Replace(strings.Replace(string(v), "", `{{ .Head }}`, 1), "", "{{ .Body }}", 1) @@ -167,7 +166,7 @@ func serveOrReverse(forced_url string, cfg *config.Config) gin.HandlerFunc { if indexTpl == nil { // Create template from file f, _ := Assets.Open("index.html") - v, _ := ioutil.ReadAll(f) + v, _ := io.ReadAll(f) v2 := strings.Replace(strings.Replace(string(v), "", `{{ .Head }}`, 1), "", "{{ .Body }}", 1)