fix staticcheck

vendor/k8s.io/metrics/pkg/client/custom_metrics/multi_client.go:49:4: ineffective break statement. Did you mean to break out of the outer loop? (SA4011)
vendor/k8s.io/metrics/pkg/client/custom_metrics/versioned_client.go:38:2: var codecs is unused (U1000)
This commit is contained in:
lala123912
2020-10-16 16:08:53 +08:00
parent cd8b87f25a
commit 324e969a6c
3 changed files with 2 additions and 7 deletions

View File

@@ -53,4 +53,3 @@ vendor/k8s.io/client-go/rest
vendor/k8s.io/client-go/rest/watch
vendor/k8s.io/client-go/transport
vendor/k8s.io/kubectl/pkg/cmd/scale
vendor/k8s.io/metrics/pkg/client/custom_metrics

View File

@@ -46,7 +46,7 @@ func PeriodicallyInvalidate(cache AvailableAPIsGetter, interval time.Duration, s
case <-ticker.C:
cache.Invalidate()
case <-stopCh:
break
return
}
}
}

View File

@@ -24,7 +24,6 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
@@ -34,10 +33,7 @@ import (
"k8s.io/metrics/pkg/client/custom_metrics/scheme"
)
var (
codecs = serializer.NewCodecFactory(scheme.Scheme)
versionConverter = NewMetricConverter()
)
var versionConverter = NewMetricConverter()
type customMetricsClient struct {
client rest.Interface