package main
import (
"github.com/guonaihong/clop"
)
typeOncestruct {
Debugbool`clop:"-d; --debug; once" usage:"debug mode"`
}
funcmain() {
o:= Once{}
clop.Bind(&o)
}
/*./once -debug -debugerror: The argument '-d' was provided more than once, but cannot be used multiple timesFor more information try --help*/
Golang 实现的命令行解析器 clop v0.0.4版本发布
项目地址
https://gitee.com/guonaihong/clop
https://github.com/guonaihong/clop
changlog
可以控制选项只能被设置一次
#35 -h; --help选项可以被重载