groups

package
v2.0.0-...-98cc131 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const FlagGroupAnnotation = "flag-group-annotation"

Variables

This section is empty.

Functions

func DetermineGroups

func DetermineGroups(f *pflag.FlagSet, cols int) map[string][]string

func FlagUsagesWrapped

func FlagUsagesWrapped(f *pflag.FlagSet, cols int) string

FlagUsagesWrapped returns a string containing the usage information for all flags in the FlagSet. Wrapped to `cols` columns (0 for no wrapping) It groups flags according to group annotation.

Types

type UsageGroup

type UsageGroup struct {
	Title  string
	Usages string
}

func GroupedFlagUsagesWrapped

func GroupedFlagUsagesWrapped(f *pflag.FlagSet, cols int) []UsageGroup

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL