mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
*: Fix linter warnings
Adapt to newly improved linters in golangci-lint v1.51.1 Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
This commit is contained in:
parent
64cf942ce8
commit
5e1f440d0a
@ -85,7 +85,6 @@ type Provider struct {
|
||||
podManager kubepod.Manager
|
||||
runtimeCache kubecontainer.RuntimeCache
|
||||
containerStatsProvider
|
||||
rlimitStatsProvider
|
||||
}
|
||||
|
||||
// containerStatsProvider is an interface that provides the stats of the
|
||||
@ -98,10 +97,6 @@ type containerStatsProvider interface {
|
||||
ImageFsDevice(ctx context.Context) (string, error)
|
||||
}
|
||||
|
||||
type rlimitStatsProvider interface {
|
||||
RlimitStats() (*statsapi.RlimitStats, error)
|
||||
}
|
||||
|
||||
// RlimitStats returns base information about process count
|
||||
func (p *Provider) RlimitStats() (*statsapi.RlimitStats, error) {
|
||||
return pidlimit.Stats()
|
||||
|
@ -215,7 +215,6 @@ var noopCounterVec = &prometheus.CounterVec{}
|
||||
var noopHistogramVec = &prometheus.HistogramVec{}
|
||||
var noopTimingHistogramVec = &promext.TimingHistogramVec{}
|
||||
var noopGaugeVec = &prometheus.GaugeVec{}
|
||||
var noopObserverVec = &noopObserverVector{}
|
||||
|
||||
// just use a convenience struct for all the no-ops
|
||||
var noop = &noopMetric{}
|
||||
@ -234,22 +233,3 @@ func (noopMetric) Desc() *prometheus.Desc { return nil }
|
||||
func (noopMetric) Write(*dto.Metric) error { return nil }
|
||||
func (noopMetric) Describe(chan<- *prometheus.Desc) {}
|
||||
func (noopMetric) Collect(chan<- prometheus.Metric) {}
|
||||
|
||||
type noopObserverVector struct{}
|
||||
|
||||
func (noopObserverVector) GetMetricWith(prometheus.Labels) (prometheus.Observer, error) {
|
||||
return noop, nil
|
||||
}
|
||||
func (noopObserverVector) GetMetricWithLabelValues(...string) (prometheus.Observer, error) {
|
||||
return noop, nil
|
||||
}
|
||||
func (noopObserverVector) With(prometheus.Labels) prometheus.Observer { return noop }
|
||||
func (noopObserverVector) WithLabelValues(...string) prometheus.Observer { return noop }
|
||||
func (noopObserverVector) CurryWith(prometheus.Labels) (prometheus.ObserverVec, error) {
|
||||
return noopObserverVec, nil
|
||||
}
|
||||
func (noopObserverVector) MustCurryWith(prometheus.Labels) prometheus.ObserverVec {
|
||||
return noopObserverVec
|
||||
}
|
||||
func (noopObserverVector) Describe(chan<- *prometheus.Desc) {}
|
||||
func (noopObserverVector) Collect(chan<- prometheus.Metric) {}
|
||||
|
@ -111,7 +111,6 @@ var _ = utils.SIGDescribe("PersistentVolumes [Feature:vsphere][Feature:LabelSele
|
||||
|
||||
func testSetupVSpherePVClabelselector(ctx context.Context, c clientset.Interface, nodeInfo *NodeInfo, ns string, ssdlabels map[string]string, vvollabels map[string]string) (volumePath string, pvSsd *v1.PersistentVolume, pvcSsd *v1.PersistentVolumeClaim, pvcVvol *v1.PersistentVolumeClaim, err error) {
|
||||
ginkgo.By("creating vmdk")
|
||||
volumePath = ""
|
||||
volumePath, err = nodeInfo.VSphere.CreateVolume(&VolumeOptions{}, nodeInfo.DataCenterRef)
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -52,9 +52,16 @@ import (
|
||||
"k8s.io/kubernetes/test/integration/framework"
|
||||
)
|
||||
|
||||
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||
type kubeClientSet = kubernetes.Interface
|
||||
|
||||
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||
type aggegatorClientSet = aggregator.Interface
|
||||
|
||||
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||
type apiextensionsClientSet = apiextensions.Interface
|
||||
|
||||
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||
type dynamicClientset = dynamic.Interface
|
||||
type testClientSet struct {
|
||||
kubeClientSet
|
||||
|
Loading…
Reference in New Issue
Block a user