flagparse

package
v0.0.0-...-9d95335 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 18 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFlag

func FindFlag(args []string, targetNames ...string) (value string, found bool)

func LoadConfFile

func LoadConfFile(confFile, defaultConfFile string, app interface{}) error

func Parse

func Parse(a interface{}, optionFns ...OptionsFn)

func ParseArgs

func ParseArgs(a interface{}, args []string, optionFns ...OptionsFn)

Types

type ArrayFlags

type ArrayFlags struct {
	Value string
	// contains filtered or unexported fields
}

func (*ArrayFlags) Set

func (i *ArrayFlags) Set(value string) error

func (*ArrayFlags) String

func (i *ArrayFlags) String() string

type Options

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

type OptionsFn

type OptionsFn func(*Options)

func AutoLoadYaml

func AutoLoadYaml(flagName, defaultCnf string) OptionsFn

func ProcessInit

func ProcessInit(initFiles *embed.FS) OptionsFn

type PostProcessor

type PostProcessor interface {
	PostProcess()
}

type UsageShower

type UsageShower interface {
	Usage() string
}

type VersionShower

type VersionShower interface {
	VersionInfo() string
}

Jump to

Keyboard shortcuts

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