Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 277 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 277 Bytes

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