// PrintHelp prints a formatted help string for a MultiFlag. This help string
// details the Options registered with the MultiFlag.
357544
func (mf *MultiFlag) PrintHelp() error {
	descriptors := make(optionDescriptorSlice, len(mf.Options))
	for idx, opt := range mf.Options {
		descriptors[idx] = opt.Descriptor()
	}
	sort.Sort(descriptors)

	fmt.Fprintln(mf.Output, mf.Description)
	return writeAlignedOptionDescriptors(mf.Output, []*OptionDescriptor(descriptors))
}
248961
func HandleFlags(f *Flags) bool {
	if !f.HasMatch() {
		return false
	}

	if f.ShowHelp() {
		f.PrintHelp()
	}

	if f.ShowVersion() {
		f.PrintVersion()
	}

	return true
}
283025
func Print(v ...interface{}) {
	std.Fprint(std.flags, LEVEL_PRINT, 2, fmt.Sprint(v...), nil)
}
926680
func SearchHelp() string {
	type help struct{ Name, Description string }
	h := []help{}
	for _, p := range keywords {
		h = append(h, help{p.Name(), p.Description()})
	}
	b, err := json.MarshalIndent(h, "", "  ")
	if err != nil {
		return "Error marshalling"
	}
	return string(b)
}
83238
func (c *Command) Printf(format string, i ...interface{}) {
	c.Print(fmt.Sprintf(format, i...))
}
452497
func HelpCallback() {
	msg := fmt.Sprintf(usageStr, os.Args[0])
	fmt.Printf("%s\n", msg)
	os.Exit(0)
}
847957
func Print(priority Priority, format string, a ...interface{}) error {
	return Send(fmt.Sprintf(format, a...), priority, nil)
}
259656
func OptionsHelpOutput(flags []*flag.Flag) string {
	sort.Sort(ByName(flags))

	var output []string
	for _, f := range flags {
		if len(f.Usage) == 0 {
			continue
		}

		output = append(output, fmt.Sprintf("-%s | %s", f.Name, f.Usage))
	}

	optionsOutput := columnize.Format(output, &columnize.Config{
		Delim:  "|",
		Glue:   "  ",
		Prefix: "  ",
		Empty:  "",
	})
	return optionsOutput
}
1208901
func (l *Log) Printf(format string, args ...interface{}) {
	if l.loadCustomLogger() {
		l.customLogger.Printf(format, args...)
		return
	}
	l.deflogger.Printf(format, args...)
}
79057
func Printf(format string, v ...interface{}) {
	if Severity >= LevelInfo {
		std.Output(5, fmt.Sprintf(format, v...), LevelInfo)
	}
}
312811
func (o *FlagOption) PrintHelp(output io.Writer) {
	flags := o.Flags()
	flags.SetOutput(output)
	flags.PrintDefaults()
}
974614
func PrintHelpWithCommand(flagMap map[string]reflect.StructField, defaultValMap map[string]reflect.Value, parsers map[reflect.Type]parse.Parser, cmd *Command, subCmd []*Command) error {
	// Hide command from help
	if cmd != nil && cmd.HideHelp {
		return fmt.Errorf("command %s not found", cmd.Name)
	}

	// Define a templates
	// Using POSXE STD : http://pubs.opengroup.org/onlinepubs/9699919799/
	const helper = `{{if .ProgDescription}}{{.ProgDescription}}

{{end}}Usage: {{.ProgName}} [flags] <command> [<arguments>]

Use "{{.ProgName}} <command> --help" for help on any command.
{{if .SubCommands}}
Commands:{{range $subCmdName, $subCmdDesc := .SubCommands}}
{{printf "\t%-50s %s" $subCmdName $subCmdDesc}}{{end}}
{{end}}
Flag's usage: {{.ProgName}} [--flag=flag_argument] [-f[flag_argument]] ...     set flag_argument to flag(s)
          or: {{.ProgName}} [--flag[=true|false| ]] [-f[true|false| ]] ...     set true/false to boolean flag(s)

Flags:
`
	// Use a struct to give data to template
	type TempStruct struct {
		ProgName        string
		ProgDescription string
		SubCommands     map[string]string
	}
	tempStruct := TempStruct{}
	if cmd != nil {
		tempStruct.ProgName = cmd.Name
		tempStruct.ProgDescription = cmd.Description
		tempStruct.SubCommands = map[string]string{}
		if len(subCmd) > 1 && cmd == subCmd[0] {
			for _, c := range subCmd[1:] {
				if !c.HideHelp {
					tempStruct.SubCommands[c.Name] = c.Description
				}
			}
		}
	} else {
		_, tempStruct.ProgName = path.Split(os.Args[0])
	}

	// Run Template
	tmplHelper, err := template.New("helper").Parse(helper)
	if err != nil {
		return err
	}
	err = tmplHelper.Execute(os.Stdout, tempStruct)
	if err != nil {
		return err
	}

	return printFlagsDescriptionsDefaultValues(flagMap, defaultValMap, parsers, os.Stdout)
}
60690
func Printf(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_PRINT, 2, fmt.Sprintf(format, v...), nil)
}
287652
func (l *Logger) Printf(format string, args ...interface{}) {
	l.mu.Lock()
	defer l.mu.Unlock()
	fmt.Fprintf(l.Out, format, args...)
}
624334
func Print(err error) string {
	return fmt.Sprintf("%v: %v\n", Code(err), err.Error())
}
127790
func (p *TextParser) readingHelp() stateFn {
	if p.currentMF.Help != nil {
		p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName()))
		return nil
	}
	// Rest of line is the docstring.
	if p.readTokenUntilNewline(true); p.err != nil {
		return nil // Unexpected end of input.
	}
	p.currentMF.Help = proto.String(p.currentToken.String())
	return p.startOfLine
}
1107920
func (debug debugging) Printf(format string, args ...interface{}) {
	if debug {
		log.Printf(format, args...)
	}
}