Merge pull request #116 from brendanburns/work

Added a -verbose flag, and made a message verbose only.
pull/6/head
Daniel Smith 2014-06-15 21:08:34 -07:00
commit 5e07157376
1 changed files with 4 additions and 1 deletions

View File

@ -46,6 +46,7 @@ var (
authConfig = flag.String("auth", os.Getenv("HOME")+"/.kubernetes_auth", "Path to the auth info file. If missing, prompt the user. Only used if doing https.")
json = flag.Bool("json", false, "If true, print raw JSON for responses")
yaml = flag.Bool("yaml", false, "If true, print raw YAML for responses")
verbose = flag.Bool("verbose", false, "If true, print extra information")
)
func usage() {
@ -77,7 +78,9 @@ func readConfig(storage string) []byte {
if err != nil {
log.Fatalf("Error parsing %v as an object for %v: %#v\n", *config, storage, err)
}
log.Printf("Parsed config file successfully; sending:\n%v\n", string(data))
if *verbose {
log.Printf("Parsed config file successfully; sending:\n%v\n", string(data))
}
return data
}