cli

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagProvider

type FlagProvider func() *pflag.FlagSet

FlagProvider defines a function which returns a FlagSet. The FlagProvider can be used to add new FlagSets in bulk.

type FlagSet

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

func NewFlagSet

func NewFlagSet(name string) *FlagSet

func (*FlagSet) Add

func (fs *FlagSet) Add(providers ...FlagProvider)

func (*FlagSet) Parse

func (fs *FlagSet) Parse()

Parse the flags passed to the binary. If an error occurs, the error is logged and the help displayed.

func (*FlagSet) Set

func (fs *FlagSet) Set() *pflag.FlagSet

Set returns the FlagSet

Jump to

Keyboard shortcuts

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