flags

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpCfg

func DumpCfg(path string, cfg interface{}) error

会覆盖写入

func LoadCfg

func LoadCfg(path string, cfg interface{})

Types

type Flags

type Flags struct {
	flag.FlagSet

	Command func() error
	Before  func() error
	After   func(error) error
	// contains filtered or unexported fields
}

func New

func New(name string, des string) *Flags

func (*Flags) Parse

func (f *Flags) Parse()

func (*Flags) Run added in v0.4.2

func (f *Flags) Run() (err error)

func (*Flags) SubCommand

func (f *Flags) SubCommand(name, des string) *Flags

func (*Flags) Usage

func (f *Flags) Usage()

func (*Flags) Write

func (f *Flags) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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