From ab40fca77cba5d68ca8077a75cb1af93dc26f06c Mon Sep 17 00:00:00 2001 From: MarkDv Date: Tue, 30 Jun 2015 21:20:50 +0100 Subject: [PATCH] align example with code implementation --- pkg/client/doc.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/client/doc.go b/pkg/client/doc.go index 59e880b8bd..ff46676156 100644 --- a/pkg/client/doc.go +++ b/pkg/client/doc.go @@ -21,6 +21,11 @@ and deleting pods, replication controllers, services, and minions. Most consumers should use the Config object to create a Client: + import ( + "github.com/GoogleCloudPlatform/kubernetes/pkg/client" + "github.com/GoogleCloudPlatform/kubernetes/pkg/api" + "github.com/GoogleCloudPlatform/kubernetes/pkg/labels" + ) config := &client.Config{ Host: "http://localhost:8080", Username: "test", @@ -30,7 +35,7 @@ Most consumers should use the Config object to create a Client: if err != nil { // handle error } - client.Pods(ns).List() + client.Pods(api.NamespaceDefault).List(labels.Everything(), fields.Everything()) More advanced consumers may wish to provide their own transport via a http.RoundTripper: