mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
fix staticcheck faulures in 'cmd' pkg
This commit is contained in:
parent
e680ad7156
commit
2fe82075b4
@ -597,6 +597,7 @@ func (s *ProxyServer) Run() error {
|
|||||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||||
fmt.Fprintf(w, "%s", s.ProxyMode)
|
fmt.Fprintf(w, "%s", s.ProxyMode)
|
||||||
})
|
})
|
||||||
|
//lint:ignore SA1019 See the Metrics Stability Migration KEP
|
||||||
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
||||||
if s.EnableProfiling {
|
if s.EnableProfiling {
|
||||||
routes.Profiling{}.Install(proxyMux)
|
routes.Profiling{}.Install(proxyMux)
|
||||||
|
@ -72,7 +72,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func newWalkFunc(invalidLink *bool, client *http.Client) filepath.WalkFunc {
|
func newWalkFunc(invalidLink *bool, client *http.Client) filepath.WalkFunc {
|
||||||
return func(filePath string, info os.FileInfo, err error) error {
|
return func(filePath string, info os.FileInfo, initErr error) error {
|
||||||
hasSuffix := false
|
hasSuffix := false
|
||||||
for _, suffix := range *fileSuffix {
|
for _, suffix := range *fileSuffix {
|
||||||
hasSuffix = hasSuffix || strings.HasSuffix(info.Name(), suffix)
|
hasSuffix = hasSuffix || strings.HasSuffix(info.Name(), suffix)
|
||||||
|
@ -27,7 +27,6 @@ import (
|
|||||||
"go/format"
|
"go/format"
|
||||||
"go/parser"
|
"go/parser"
|
||||||
"go/token"
|
"go/token"
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
@ -35,6 +34,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
cluster/images/etcd-version-monitor
|
cluster/images/etcd-version-monitor
|
||||||
cluster/images/etcd/migrate
|
cluster/images/etcd/migrate
|
||||||
cmd/kube-proxy/app
|
|
||||||
cmd/linkcheck
|
|
||||||
pkg/controller/daemon
|
pkg/controller/daemon
|
||||||
pkg/controller/deployment
|
pkg/controller/deployment
|
||||||
pkg/controller/disruption
|
pkg/controller/disruption
|
||||||
|
Loading…
Reference in New Issue
Block a user