Skip to content

Commit

Permalink
fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
m-terra committed Mar 20, 2023
1 parent c116f89 commit edd1e96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
run:
timeout: 1m
timeout: 5m
linters:
enable:
- asciicheck
- deadcode
- depguard
- dogsled
- durationcheck
Expand All @@ -28,7 +27,6 @@ linters:
- typecheck
- unconvert
- unused
- varcheck
disable:
# https://github.com/golangci/golangci-lint/issues/2649
- structcheck
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
test: lint unit-test

lint: lint-bin ## Run go golangci-lint against code.
$(GOLANGCI_LINT) run --timeout 5m0s
$(GOLANGCI_LINT) run

unit-test: mocks
go test -v ./... --vet=off -coverprofile cover.out
Expand All @@ -12,7 +12,7 @@ mocks: mockgen

GOLANGCI_LINT = ./bin/golangci-lint
lint-bin: ## Download golangci-lint locally if necessary.
$(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.2)
$(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0)

MOCKGEN = ./bin/mockgen
mockgen: ## Download mockgen locally if necessary.
Expand Down
5 changes: 1 addition & 4 deletions utils/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,5 @@ func (r *Response) UnmarshalJSON(v interface{}) error {
if _, err := io.Copy(buf, r.Body); err != nil {
return err
}
if err := json.Unmarshal(buf.Bytes(), v); err != nil {
return err
}
return nil
return json.Unmarshal(buf.Bytes(), v)
}

0 comments on commit edd1e96

Please sign in to comment.