From cbbc53e23b423aa96a69fc7503b726857244aaa4 Mon Sep 17 00:00:00 2001 From: Peter Klijn Date: Tue, 21 Sep 2021 00:05:34 +0200 Subject: [PATCH] Fix staticcheck errors Fixed the following staticcheck errors: filters/auth/grantcallback.go:11:1: comment on exported const GrantCallbackName should be of the form "GrantCallbackName ..." (ST1022) filters/auth/grantclaimsquery.go:12:1: comment on exported const GrantClaimsQueryName should be of the form "GrantClaimsQueryName ..." (ST1022) filters/diag/absorb.go:14:1: comment on exported const AbsorbName should be of the form "AbsorbName ..." (ST1022) filters/diag/absorb.go:17:1: comment on exported const AbsorbSilentName should be of the form "AbsorbSilentName ..." (ST1022) filters/rfc/rfc.go:8:1: comment on exported const Name should be of the form "Name ..." (ST1022) filters/tee/teeloopback.go:9:1: comment on exported const FilterName should be of the form "FilterName ..." (ST1022) predicates/cookie/cookie.go:14:1: comment on exported const Name should be of the form "Name ..." (ST1022) predicates/methods/methods.go:29:1: comment on exported const Name should be of the form "Name ..." (ST1022) Signed-off-by: Peter Klijn --- filters/auth/grantcallback.go | 1 + filters/auth/grantclaimsquery.go | 1 + filters/diag/absorb.go | 2 ++ filters/rfc/rfc.go | 1 + filters/tee/teeloopback.go | 1 + predicates/cookie/cookie.go | 1 + predicates/methods/methods.go | 1 + 7 files changed, 8 insertions(+) diff --git a/filters/auth/grantcallback.go b/filters/auth/grantcallback.go index 0463bebd11..8044a948df 100644 --- a/filters/auth/grantcallback.go +++ b/filters/auth/grantcallback.go @@ -8,6 +8,7 @@ import ( "golang.org/x/oauth2" ) +// GrantCallbackName is the filter name // Deprecated, use filters.GrantCallbackName instead const GrantCallbackName = filters.GrantCallbackName diff --git a/filters/auth/grantclaimsquery.go b/filters/auth/grantclaimsquery.go index ed4674b9fc..72ab6dc196 100644 --- a/filters/auth/grantclaimsquery.go +++ b/filters/auth/grantclaimsquery.go @@ -9,6 +9,7 @@ package auth import "github.com/zalando/skipper/filters" +// GrantClaimsQueryName is the filter name // Deprecated, use filters.GrantClaimsQueryName instead const GrantClaimsQueryName = filters.GrantClaimsQueryName diff --git a/filters/diag/absorb.go b/filters/diag/absorb.go index cb0470ba08..0d53601236 100644 --- a/filters/diag/absorb.go +++ b/filters/diag/absorb.go @@ -10,9 +10,11 @@ import ( "github.com/zalando/skipper/logging" ) +// AbsorbName contains the name of the absorb filter. // Deprecated, use filters.AbsorbName instead const AbsorbName = filters.AbsorbName +// AbsorbSilentName contains the name of the absorbSilent filter. // Deprecated, use filters.AbsorbSilentName instead const AbsorbSilentName = filters.AbsorbSilentName diff --git a/filters/rfc/rfc.go b/filters/rfc/rfc.go index f8b15e1a84..10ca8d057e 100644 --- a/filters/rfc/rfc.go +++ b/filters/rfc/rfc.go @@ -5,6 +5,7 @@ import ( "github.com/zalando/skipper/rfc" ) +// Name is the filter name // Deprecated, use filters.RfcPathName instead const Name = filters.RfcPathName diff --git a/filters/tee/teeloopback.go b/filters/tee/teeloopback.go index 99fff50e14..82da05c7b1 100644 --- a/filters/tee/teeloopback.go +++ b/filters/tee/teeloopback.go @@ -6,6 +6,7 @@ import ( teepredicate "github.com/zalando/skipper/predicates/tee" ) +// FilterName is the filter name // Deprecated, use filters.TeeLoopbackName instead const FilterName = filters.TeeLoopbackName diff --git a/predicates/cookie/cookie.go b/predicates/cookie/cookie.go index 7881c06ef0..734077d43e 100644 --- a/predicates/cookie/cookie.go +++ b/predicates/cookie/cookie.go @@ -11,6 +11,7 @@ import ( "github.com/zalando/skipper/routing" ) +// Name the predicate can be referenced in eskip by the name "Cookie". // Deprecated, use predicates.CookieName instead const Name = predicates.CookieName diff --git a/predicates/methods/methods.go b/predicates/methods/methods.go index 4afba255d3..18a4914742 100644 --- a/predicates/methods/methods.go +++ b/predicates/methods/methods.go @@ -26,6 +26,7 @@ import ( "github.com/zalando/skipper/routing" ) +// Name is the predicate name // Deprecated, use predicates.MethodsName instead const Name = predicates.MethodsName