diff --git a/.golangci.yml b/.golangci.yml index 255525e8..2e2cc547 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -47,6 +47,7 @@ linters: - unconvert - unparam - unused + - usestdlibvars - wastedassign - whitespace - wrapcheck diff --git a/ImageWidgets.go b/ImageWidgets.go index 7c76e48c..33262c64 100644 --- a/ImageWidgets.go +++ b/ImageWidgets.go @@ -350,7 +350,7 @@ func (i *ImageWithURLWidget) Build() { // Load image from url client := &http.Client{Timeout: i.downloadTimeout} - req, err := http.NewRequestWithContext(downloadContext, "GET", i.imgURL, http.NoBody) + req, err := http.NewRequestWithContext(downloadContext, http.MethodGet, i.imgURL, http.NoBody) if err != nil { errorFn(err) return