// LookupOption checks boolean flag with default (usually config) and command-line // setting func LookupOption(defaultValue bool, flags *flag.FlagSet, name string) (result bool) { result = defaultValue if flags.IsSet(name) { result = flags.Lookup(name).Value.Get().(bool) } return }