Merge pull request #23660 from goltermann/vetclean

Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
This commit is contained in:
k8s-merge-robot
2016-04-12 06:22:16 -07:00
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{
@@ -390,7 +390,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{
@@ -439,7 +439,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{
@@ -488,7 +488,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{
@@ -524,7 +524,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{
@@ -656,7 +656,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{
@@ -677,7 +677,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{
@@ -700,7 +700,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{