flag

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseArgs added in v0.4.0

func ParseArgs(args []string) ([]string, []string)

func SetUsage added in v0.4.0

func SetUsage(set *flag.FlagSet, options ...UsageOption)

Types

type EnvMap

type EnvMap map[string]string

func (EnvMap) Set

func (e EnvMap) Set(arg string) error

func (EnvMap) String

func (e EnvMap) String() string

type StringSlice

type StringSlice []string

func (*StringSlice) Set

func (e *StringSlice) Set(value string) error

func (*StringSlice) String

func (e *StringSlice) String() string

type Usage added in v0.4.0

type Usage struct {
	// contains filtered or unexported fields
}

type UsageOption added in v0.4.0

type UsageOption = func(u *Usage)

func WithUsageDescription added in v0.4.0

func WithUsageDescription(parts ...string) UsageOption

func WithUsageExec added in v0.4.0

func WithUsageExec(exec bool) UsageOption

func WithUsageExecutable added in v0.4.0

func WithUsageExecutable(executable string) UsageOption

func WithUsageNotes added in v0.4.0

func WithUsageNotes(parts ...string) UsageOption

func WithUsageVersion added in v0.4.0

func WithUsageVersion(version string) UsageOption

Jump to

Keyboard shortcuts

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