Разблокировал версию линт-менеджера и задизейблил парочку линтеров, т.к. они не представляют особой ценности в данном проекте.

master
Andrey Ivanov 2020-11-11 20:35:37 +03:00 committed by tiburon
parent b39e1ad91c
commit 6f18cc8f22
3 changed files with 5 additions and 3 deletions

View File

@ -16,4 +16,6 @@ linters:
- wsl
- nlreturn
- whitespace
- bodyclose
- bodyclose
- wrapcheck
- exhaustivestruct

View File

@ -22,5 +22,5 @@ docker-run:
install-lint-deps:
rm -rf $(shell go env GOPATH)/bin/golangci-lint
(which golangci-lint > /dev/null) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.30.0
(which golangci-lint > /dev/null) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin
.PHONY: build test lint

View File

@ -40,7 +40,7 @@ func buildQuery(u *url.URL) (q Query, err error) {
}
func (q Query) id() string {
return strings.Replace(strconv.Itoa(q.Width)+"/"+strconv.Itoa(q.Height)+q.URL.Path, "/", "_", -1)
return strings.ReplaceAll(strconv.Itoa(q.Width)+"/"+strconv.Itoa(q.Height)+q.URL.Path, "/", "_")
}
func (q Query) fromOrigin(ctx context.Context, headers http.Header, timeout time.Duration) ([]byte, *http.Response, error) {