Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staticcheck: vendor/k8s.io/kubectl/pkg/cmd/testing etc. #87404

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions hack/.staticcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,5 @@ vendor/k8s.io/client-go/transport
vendor/k8s.io/component-base/metrics
vendor/k8s.io/kubectl/pkg/cmd/edit
vendor/k8s.io/kubectl/pkg/cmd/get
vendor/k8s.io/kubectl/pkg/cmd/scale
vendor/k8s.io/kubectl/pkg/cmd/set
vendor/k8s.io/kubectl/pkg/cmd/testing
vendor/k8s.io/metrics/pkg/client/custom_metrics
3 changes: 3 additions & 0 deletions staging/src/k8s.io/kubectl/pkg/cmd/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ func (o ProxyOptions) Validate() error {
// RunProxy checks given arguments and executes command
func (o ProxyOptions) RunProxy() error {
server, err := proxy.NewServer(o.staticDir, o.apiPrefix, o.staticPrefix, o.filter, o.clientConfig, o.keepalive)
if err != nil {
klog.Fatal(err)
}

if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kubectl/pkg/cmd/scale/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (o *ScaleOptions) RunScale() error {
}

infos := []*resource.Info{}
err = r.Visit(func(info *resource.Info, err error) error {
_ = r.Visit(func(info *resource.Info, err error) error {
if err == nil {
infos = append(infos, info)
}
Expand Down
3 changes: 0 additions & 3 deletions staging/src/k8s.io/kubectl/pkg/cmd/testing/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package testing

import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
Expand Down Expand Up @@ -271,8 +270,6 @@ func convertExternalNamespacedType2ToInternalNamespacedType(in *ExternalNamespac
return nil
}

var errInvalidVersion = errors.New("not a version")

// ValidVersion of API
var ValidVersion = "v1"

Expand Down