From 5006942cdb227c52058e6d67001bd34b21c7cfb7 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Mon, 30 Sep 2024 22:02:14 +0200 Subject: [PATCH] enable usestdlibvars --- .golangci.yml | 1 + ImageWidgets.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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