Versions in this module Expand all Collapse all v0 v0.1.1 Jul 3, 2021 v0.1.0 Jul 2, 2021 Changes in this version + func DotEnvParser(r io.Reader, set func(name, value string) error) error + func Parse(fs *pflag.FlagSet, args []string, options ...Option) error + func PlainParser(r io.Reader, set func(name, value string) error) error + func SetDefaultConfigFileDirectory(val string) + func SetDefaultConfigFileFlagName(val string) + func SetDefaultConfigFileFlagShortHand(val string) + func SetDefaultConfigFileFlagUsage(val string) + func SetDefaultConfigFileName(val string) + func SetDefaultConfigFileType(val string) + func SetDefaultLogFileDirectory(val string) + func SetDefaultLogFileFlagName(val string) + func SetDefaultLogFileFlagShortHand(val string) + func SetDefaultLogFileFlagUsage(val string) + type Boot interface + Execute func() (err error) + func New(name string, server Booter, config Root) (bt Boot, err error) + type Booter interface + Close func() (err error) + Serve func() (err error) + type Command struct + Exec func(ctx context.Context, args []string) error + FlagSet *bootflag.FlagSet + Hidden bool + LongHelp string + Name string + Options []Option + ShortHelp string + ShortUsage string + Subcommands []*Command + func (c *Command) Parse(args []string) error + func (c *Command) ParseAndRun(ctx context.Context, args []string) error + func (c *Command) Run(ctx context.Context) (err error) + type Config struct + Configurator Configurator + LongHelp string + Options []Option + ShortHelp string + ShortUsage string + type ConfigFileParser func(r io.Reader, set func(name, value string) error) error + type Configurator interface + Initialize func(name string) (err error) + type Option func(*pContext) + func WithAllowMissingConfigFile(allow bool) Option + func WithConfigFile(filename string) Option + func WithConfigFileFlag(flagname string) Option + func WithConfigFileParser(p ConfigFileParser) Option + func WithConfigFileVia(filename *string) Option + func WithEnvVarNoPrefix() Option + func WithEnvVarPrefix(prefix string) Option + func WithEnvVarSplit(delimiter string) Option + func WithIgnoreUndefined(ignore bool) Option + type ParseError struct + Inner error + func (e ParseError) Error() string + func (e ParseError) Unwrap() error + type Root struct + CustomCommands []*Command + ErrorHandling flag.ErrorHandling + Exec func(ctx context.Context, args []string) error + LocalRPCDialOptions []grpc.DialOption + LocalRPCServerOptions []grpc.ServerOption + LongHelp string + Options []Option + ShortHelp string + ShortUsage string + Start *Config + Stop *Config