From c268dfb56042233dfef7eadfa8ad36b1f4ea7ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandor=20Sz=C3=BCcs?= Date: Tue, 8 Dec 2020 20:26:01 +0100 Subject: [PATCH] fix linter staticcheck -ST1022 (#1642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sandor Szücs --- Makefile | 2 +- filters/filters.go | 2 +- predicates/cookie/cookie.go | 2 +- predicates/predicates.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f282491d0b..184b5343ca 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@ vet: $(SOURCES) # -ST1021 too many wrong comments on exported functions to fix right away # -ST1022 too many wrong comments on exported functions to fix right away staticcheck: $(SOURCES) - GO111MODULE=$(GO111) .bin/staticcheck -checks "all,-ST1000,-ST1003,-ST1012,-ST1020,-ST1021,-ST1022" $(PACKAGES) + GO111MODULE=$(GO111) .bin/staticcheck -checks "all,-ST1000,-ST1003,-ST1012,-ST1020,-ST1021" $(PACKAGES) # TODO(sszuecs) review disabling these checks, f.e.: # G101 find by variable name match "oauth" are not hardcoded credentials diff --git a/filters/filters.go b/filters/filters.go index f45ba1247b..a854237ded 100644 --- a/filters/filters.go +++ b/filters/filters.go @@ -157,7 +157,7 @@ type Spec interface { // Registry used to lookup Spec objects while initializing routes. type Registry map[string]Spec -// Error used in case of invalid filter parameters. +// ErrInvalidFilterParameters is used in case of invalid filter parameters. var ErrInvalidFilterParameters = errors.New("invalid filter parameters") // Registers a filter specification. diff --git a/predicates/cookie/cookie.go b/predicates/cookie/cookie.go index f232f83449..47cfda77a1 100644 --- a/predicates/cookie/cookie.go +++ b/predicates/cookie/cookie.go @@ -11,7 +11,7 @@ import ( "github.com/zalando/skipper/routing" ) -// The predicate can be referenced in eskip by the name "Cookie". +// Name the predicate can be referenced in eskip by the name "Cookie". const Name = "Cookie" type ( diff --git a/predicates/predicates.go b/predicates/predicates.go index b4e89482a1..052602f1aa 100644 --- a/predicates/predicates.go +++ b/predicates/predicates.go @@ -2,5 +2,5 @@ package predicates import "errors" -// Error used in case of invalid predicate parameters. +// ErrInvalidPredicateParameters is used in case of invalid predicate parameters. var ErrInvalidPredicateParameters = errors.New("invalid predicate parameters")