项目地址
https://gitee.com/guonaihong/clop
https://github.com/guonaihong/clop
changlog
可以控制选项只能被设置一次
package main import ( "github.com/guonaihong/clop" ) type Once struct { Debug bool `clop:"-d; --debug; once" usage:"debug mode"` } func main() { o := Once{} clop.Bind(&o) } /* ./once -debug -debug error: The argument '-d' was provided more than once, but cannot be used multiple times For more information try --help */
#35 -h; --help选项可以被重载