package config // this is an experiment at this point to // see how this turns out func Verbose() bool { // always use the config file value first if configPB != nil { found := configPB.findByKey("Verbose") if found == nil { // Verbose isn't in the config. do nothing here } else { // return what the config file has // fmt.Println("returning from the config:" + found.Value) if found.Value == "true" { return true } return false } } // nothing in the config file. check argv for _, v := range argv { if v == "--verbose" { return true } } return false } func If(key string) bool { // always use the config file value first if configPB != nil { found := configPB.findByKey(key) if found == nil { // Verbose isn't in the config. do nothing here } else { // return what the config file has // fmt.Println("returning from the config:" + found.Value) if found.Value == "true" { return true } return false } } // nothing in the config file. check argv // todo: turn key to lowercase and check here for _, v := range argv { if v == "--verbose" { return true } } return false }