fix staticcheck for kubectl pkg files
Kubernetes-commit: f6b3c5fb3f78d1d2736fe97326b976783b34f6b7
This commit is contained in:
parent
c1df07341a
commit
ac26f503e8
|
@ -162,8 +162,8 @@ func (s *CustomColumnsPrinter) PrintObj(obj runtime.Object, out io.Writer) error
|
||||||
return fmt.Errorf(printers.InternalObjectPrinterErr)
|
return fmt.Errorf(printers.InternalObjectPrinterErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if w, found := out.(*tabwriter.Writer); !found {
|
if _, found := out.(*tabwriter.Writer); !found {
|
||||||
w = printers.GetNewTabWriter(out)
|
w := printers.GetNewTabWriter(out)
|
||||||
out = w
|
out = w
|
||||||
defer w.Flush()
|
defer w.Flush()
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
openapiSchemaPath = filepath.Join("..", "..", "..", "testdata", "openapi", "swagger.json")
|
|
||||||
grace = int64(30)
|
grace = int64(30)
|
||||||
enableServiceLinks = corev1.DefaultEnableServiceLinks
|
enableServiceLinks = corev1.DefaultEnableServiceLinks
|
||||||
)
|
)
|
||||||
|
@ -90,6 +89,7 @@ func testComponentStatusData() *corev1.ComponentStatusList {
|
||||||
// Verifies that schemas that are not in the master tree of Kubernetes can be retrieved via Get.
|
// Verifies that schemas that are not in the master tree of Kubernetes can be retrieved via Get.
|
||||||
func TestGetUnknownSchemaObject(t *testing.T) {
|
func TestGetUnknownSchemaObject(t *testing.T) {
|
||||||
t.Skip("This test is completely broken. The first thing it does is add the object to the scheme!")
|
t.Skip("This test is completely broken. The first thing it does is add the object to the scheme!")
|
||||||
|
var openapiSchemaPath = filepath.Join("..", "..", "..", "testdata", "openapi", "swagger.json")
|
||||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||||
defer tf.Cleanup()
|
defer tf.Cleanup()
|
||||||
_, _, codec := cmdtesting.NewExternalScheme()
|
_, _, codec := cmdtesting.NewExternalScheme()
|
||||||
|
|
|
@ -18,7 +18,6 @@ package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
@ -271,8 +270,6 @@ func convertExternalNamespacedType2ToInternalNamespacedType(in *ExternalNamespac
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var errInvalidVersion = errors.New("not a version")
|
|
||||||
|
|
||||||
// ValidVersion of API
|
// ValidVersion of API
|
||||||
var ValidVersion = "v1"
|
var ValidVersion = "v1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue