Skip to content

chzyer-other/flagx

Repository files navigation

flagx

A Replacement for golang stdlib flag

Getting started

// main.go
type Config struct {
	FileName string `flag:"[0]"`
}

func main() {
	var c Config
	flagx.Parse(&c)
	fmt.Println(c.FileName)
}
go run main.go ~/.profile
// Output: ~/.profile

About

flagx is a struct-bindding wrap for golang flag library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages