func (opt *SubOptions) Usage(name string) (usage string) {
	usage = "Usage: ggman"

	// the for argument
	if opt.ForArgument == OptionalFor {
		usage += " [for|--for|-f FILTER]"
	}

	// the name and help
	usage += " " + name + " [help|--help|-h]"

	flagSyntax := ""
	if opt.Flag != "" {
		flagSyntax += " [" + opt.Flag + "]"
	}

	// read the metavar
	mv := opt.Metavar
	if mv == "" {
		mv = "ARGUMENT"
	}

	argSyntax := ""
	if opt.MaxArgs == -1 {
		// write out the argument an appropriate number of times
		argSyntax += strings.Repeat(" "+mv, opt.MinArgs)
		argSyntax += " [" + mv + " ... ]"
	} else {
		// write out the argument an appropriate number of times
		argSyntax += strings.Repeat(" "+mv, opt.MinArgs)
		argSyntax += strings.Repeat(" ["+mv, opt.MaxArgs-opt.MinArgs)
		argSyntax += strings.Repeat("]", opt.MaxArgs-opt.MinArgs)
	}

	usage += flagSyntax + argSyntax

	// start with the help argument
	usage += `

    help|--help|-h
        Print this usage message and exit.`

	// contineu with the 'for' argument
	if opt.ForArgument != NoFor {
		usage += `

    for|--for|-f FILTER
        Filter the list of repositories to apply command to by FILTER.`
	}

	// if there is a flag, add a flagdescription
	if opt.Flag != "" {
		usage += fmt.Sprintf(`

   %s
        %s`, flagSyntax, opt.FlagDescription)
	}

	if opt.UsageDescription != "" {
		usage += fmt.Sprintf(`

   %s
        %s`, argSyntax, opt.UsageDescription)
	}

	return
}
// Usage returns a usage string for this command
Usage returns a usage string for this command
// Usage returns a usage string for this command
func (opt *SubOptions) Usage(name string) (usage string) {
	usage = "Usage: ggman"
	if opt.ForArgument == OptionalFor {
		usage += " [for|--for|-f FILTER]"
	}
	usage += " " + name + " [help|--help|-h]"
	flagSyntax := ""
	if opt.Flag != "" {
		flagSyntax += " [" + opt.Flag + "]"
	}
	mv := opt.Metavar
	if mv == "" {
		mv = "ARGUMENT"
	}
	argSyntax := ""
	if opt.MaxArgs == -1 {
		argSyntax += strings.Repeat(" "+mv, opt.MinArgs)
		argSyntax += " [" + mv + " ... ]"
	} else {
		argSyntax += strings.Repeat(" "+mv, opt.MinArgs)
		argSyntax += strings.Repeat(" ["+mv, opt.MaxArgs-opt.MinArgs)
		argSyntax += strings.Repeat("]", opt.MaxArgs-opt.MinArgs)
	}
	usage += flagSyntax + argSyntax
	usage += `
    help|--help|-h
        Print this usage message and exit.`
	if opt.ForArgument != NoFor {
		usage += `
    for|--for|-f FILTER
        Filter the list of repositories to apply command to by FILTER.`
	}
	if opt.Flag != "" {
		usage += fmt.Sprintf(`
   %s
        %s`, flagSyntax, opt.FlagDescription)
	}
	if opt.UsageDescription != "" {
		usage += fmt.Sprintf(`
   %s
        %s`, argSyntax, opt.UsageDescription)
	}
	return
}
func ( opt * SubOptions ) Usage ( name string ) ( usage string ) { usage = " " if opt . ForArgument == OptionalFor { usage += " " } usage += " " + name + " " flagSyntax := " " if opt . Flag != " " { flagSyntax += " " + opt . Flag + " " } mv := opt . Metavar if mv == " " { mv = " " } argSyntax := " " if opt . MaxArgs == - 1 { argSyntax += strings . Repeat ( " " + mv , opt . MinArgs ) argSyntax += " " + mv + " " } else { argSyntax += strings . Repeat ( " " + mv , opt . MinArgs ) argSyntax += strings . Repeat ( " " + mv , opt . MaxArgs - opt . MinArgs ) argSyntax += strings . Repeat ( " " , opt . MaxArgs - opt . MinArgs ) } usage += flagSyntax + argSyntax usage += `

    help|--help|-h
        Print this usage message and exit.` if opt . ForArgument != NoFor { usage += `

    for|--for|-f FILTER
        Filter the list of repositories to apply command to by FILTER.` } if opt . Flag != " " { usage += fmt . Sprintf ( `

   %s
        %s` , flagSyntax , opt . FlagDescription ) } if opt . UsageDescription != " " { usage += fmt . Sprintf ( `

   %s
        %s` , argSyntax , opt . UsageDescription ) } return }
Usage returns a usage string for this command
Usage returns a usage string for this command
// the for argument // the name and help // read the metavar // write out the argument an appropriate number of times // write out the argument an appropriate number of times // start with the help argument // contineu with the 'for' argument // if there is a flag, add a flagdescription