Skip to content

Commit d1f475a

Browse files
authored
chore: add support for usestdlibvars (#2708)
1 parent b29d99a commit d1f475a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ linters:
6666
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: false, auto-fix: false]
6767
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: false, auto-fix: false]
6868
- unconvert # Remove unnecessary type conversions [fast: false, auto-fix: false]
69+
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library. [fast: true, auto-fix: false]
6970
- wastedassign # wastedassign finds wasted assignment statements. [fast: false, auto-fix: false]
7071
- whitespace # Tool for detection of leading and trailing whitespace [fast: true, auto-fix: true]
7172
- zerologlint # Detects the wrong usage of `zerolog` that a user forgets to dispatch with `Send` or `Msg` [fast: false, auto-fix: false]

internal/services/iot/helpers_iot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func computeIotHubMQTTCa(ctx context.Context, mqttCaURL string, m interface{}) (
7575
return "", nil
7676
}
7777
var mqttCa *http.Response
78-
req, _ := http.NewRequestWithContext(ctx, "GET", mqttCaURL, nil)
78+
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, mqttCaURL, nil)
7979
mqttCa, err := meta.ExtractHTTPClient(m).Do(req)
8080
if err != nil {
8181
return "", err

0 commit comments

Comments
 (0)