// MaskFromFlags merges a variadic set of Flags into a single Mask.
191772
func MaskFromFlags(flags ...Flag) Mask {
	var mask Mask
	for _, flag := range flags {
		mask |= Mask(flag)
	}

	return mask
}
427579
func RegisterFlags(flags Flags) {
	if flags&FlagsLog != 0 {
		RegisterLogFlags()
	}
	if flags&FlagsProfile != 0 {
		RegisterProfileFlags()
	}
	if flags&FlagsTasks != 0 {
		RegisterTaskFlags()
	}
}
486207
func (c *setFirewallRuleCommand) SetFlags(f *gnuflag.FlagSet) {
	f.StringVar(&c.whitelistValue, "whitelist", "", "list of subnets to whitelist")
}
352989
func (c *Config) AddFlagsPrefix(fs *flag.FlagSet, prefix string) {
	fs.Var(&c.Level, prefix+"log-level",
		"The logging level. Valid options are: debug, info, warning, error.")
}
853528
func (c *branchCommand) SetFlags(f *gnuflag.FlagSet) {
	c.ModelCommandBase.SetFlags(f)
}
740493
func (c *Config) Mask() Mask {
	var flags []Flag

	if c.ExitSettle {
		flags = append(flags, ExitSettle)
	}
	if c.AddIncoming {
		flags = append(flags, AddIncoming)
	}
	if c.SettleIncoming {
		flags = append(flags, SettleIncoming)
	}
	if c.FailIncoming {
		flags = append(flags, FailIncoming)
	}
	if c.AddOutgoing {
		flags = append(flags, AddOutgoing)
	}
	if c.SettleOutgoing {
		flags = append(flags, SettleOutgoing)
	}
	if c.FailOutgoing {
		flags = append(flags, FailOutgoing)
	}
	if c.Commit {
		flags = append(flags, Commit)
	}
	if c.BogusSettle {
		flags = append(flags, BogusSettle)
	}

	// NOTE: The value returned here will only honor the configuration if
	// the dev build flag is present. In production, this method always
	// returns hodl.MaskNone and Active(*) always returns false.
	return MaskFromFlags(flags...)
}
1048575
func (c *slaCommand) SetFlags(f *gnuflag.FlagSet) {
	c.ModelCommandBase.SetFlags(f)
	c.out.AddFlags(f, "tabular", map[string]cmd.Formatter{
		"tabular": formatTabular,
		"json":    cmd.FormatJson,
		"yaml":    cmd.FormatYaml,
	})
	f.StringVar(&c.Budget, "budget", "", "the maximum spend for the model")
}
12490
func (c *listAgreementsCommand) SetFlags(f *gnuflag.FlagSet) {
	c.CommandBase.SetFlags(f)
	c.out.AddFlags(f, "tabular", map[string]cmd.Formatter{
		"tabular": formatTabular,
		"json":    formatJSON,
		"yaml":    cmd.FormatYaml,
	})
}
111027
func (c *infoCommand) SetFlags(f *gnuflag.FlagSet) {
	c.infoCommandBase.SetFlags(f)
	c.out.AddFlags(f, "yaml", output.DefaultFormatters)
}
26881
func (m *DummyMessage) AddFlags(newFlags types.Flags) Message {
	m.flags = m.flags.SetFlags(newFlags)
	return m
}
348067
func (cl *CoLog) SetFlags(flags int) {
	cl.mu.Lock()
	defer cl.mu.Unlock()
	if cl.formatter == nil {
		return
	}

	cl.formatter.SetFlags(flags)
}
574152
func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet) {
	if o == nil {
		return
	}

	fs.Int32Var(&o.ConcurrentServiceSyncs, "concurrent-service-syncs", o.ConcurrentServiceSyncs, "The number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load")
}
846365
func (c *Gcd) AddFlags(flags []string) {
	c.flags = append(c.flags, flags...)
}
1371698
func Ldflags(flags ...string) func(*Context) error {
	return func(c *Context) error {
		c.ldflags = append(c.ldflags, flags...)
		return nil
	}
}
382576
func (c *listCommand) SetFlags(f *gnuflag.FlagSet) {
	c.CachedImagesCommandBase.SetFlags(f)
	f.StringVar(&c.Kind, "kind", "", "The image kind to list eg lxd")
	f.StringVar(&c.Series, "series", "", "The series of the image to list eg xenial")
	f.StringVar(&c.Arch, "arch", "", "The architecture of the image to list eg amd64")
	c.out.AddFlags(f, "yaml", output.DefaultFormatters)
}
699311
func (c *CreateCommand) SetFlags(f *gnuflag.FlagSet) {
	c.SubnetCommandBase.SetFlags(f)
	f.BoolVar(&c.IsPublic, "public", false, "enable public access with shadow addresses")
	f.BoolVar(&c.IsPrivate, "private", true, "disable public access with shadow addresses")

	// Because SetFlags is called before Parse, we cannot
	// use f.Visit() here to check both flags were not
	// specified at once. So we store the flag set and
	// defer the check to Init().
	c.flagSet = f
}
194608
func (c *agentConf) AddFlags(f *gnuflag.FlagSet) {
	// TODO(dimitern) 2014-02-19 bug 1282025
	// We need to pass a config location here instead and
	// use it to locate the conf and the infer the data-dir
	// from there instead of passing it like that.
	f.StringVar(&c.dataDir, "data-dir", util.DataDir, "directory for juju data")
}