Vet fixes, mostly pass lock by value errors.

This commit is contained in:
goltermann
2016-03-23 16:45:24 -07:00
parent 8e4ac1925b
commit 696423e044
33 changed files with 136 additions and 118 deletions

View File

@@ -344,7 +344,7 @@ func stringBody(body string) io.ReadCloser {
// }
//}
func ExamplePrintReplicationControllerWithNamespace() {
func Example_printReplicationControllerWithNamespace() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -389,7 +389,7 @@ func ExamplePrintReplicationControllerWithNamespace() {
// beep foo 1 1 10y
}
func ExamplePrintMultiContainersReplicationControllerWithWide() {
func Example_printMultiContainersReplicationControllerWithWide() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, true, false, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -437,7 +437,7 @@ func ExamplePrintMultiContainersReplicationControllerWithWide() {
// foo 1 1 10y foo,foo2 someimage,someimage2 foo=bar
}
func ExamplePrintReplicationController() {
func Example_printReplicationController() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -485,7 +485,7 @@ func ExamplePrintReplicationController() {
// foo 1 1 10y
}
func ExamplePrintPodWithWideFormat() {
func Example_printPodWithWideFormat() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, true, false, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -520,7 +520,7 @@ func ExamplePrintPodWithWideFormat() {
// test1 1/2 podPhase 6 10y kubernetes-minion-abcd
}
func ExamplePrintPodWithShowLabels() {
func Example_printPodWithShowLabels() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, true, false, []string{})
tf.Client = &fake.RESTClient{
@@ -651,7 +651,7 @@ func newAllPhasePodList() *api.PodList {
}
}
func ExamplePrintPodHideTerminated() {
func Example_printPodHideTerminated() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, false, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -671,7 +671,7 @@ func ExamplePrintPodHideTerminated() {
// test5 1/2 Unknown 6 10y
}
func ExamplePrintPodShowAll() {
func Example_printPodShowAll() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, false, false, true, false, false, []string{})
tf.Client = &fake.RESTClient{
@@ -693,7 +693,7 @@ func ExamplePrintPodShowAll() {
// test5 1/2 Unknown 6 10y
}
func ExamplePrintServiceWithNamespacesAndLabels() {
func Example_printServiceWithNamespacesAndLabels() {
f, tf, codec := NewAPIFactory()
tf.Printer = kubectl.NewHumanReadablePrinter(false, true, false, false, false, false, []string{"l1"})
tf.Client = &fake.RESTClient{