Fix documentation in clientcmd/doc.go.

This commit is contained in:
Matt Butcher 2015-09-21 13:39:04 -06:00
parent 915bc04488
commit 625a64c9ec

View File

@ -19,13 +19,19 @@ Package clientcmd provides one stop shopping for building a working client from
from a .kubeconfig file, from command line flags, or from any merged combination. from a .kubeconfig file, from command line flags, or from any merged combination.
Sample usage from merged .kubeconfig files (local directory, home directory) Sample usage from merged .kubeconfig files (local directory, home directory)
loadingRules := clientcmd.NewKubeConfigLoadingRules()
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
// if you want to change the loading rules (which files in which order), you can do so here // if you want to change the loading rules (which files in which order), you can do so here
configOverrides := &clientcmd.ConfigOverrides{} configOverrides := &clientcmd.ConfigOverrides{}
// if you want to change override values or bind them to flags, there are methods to help you // if you want to change override values or bind them to flags, there are methods to help you
kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingKubeConfig(loadingRules, configOverrides) kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides)
kubeConfig.Client() config, err := kubeConfig.ClientConfig()
if err != nil {
// Do something
}
client, err := unversioned.New(config)
// ...
*/ */
package clientcmd package clientcmd