Skip to content

v0.0.4版本

Compare
Choose a tag to compare
@guonaihong guonaihong released this 22 Apr 05:38
· 56 commits to master since this release
b9bcf4f

#26 可以控制选项只能被设置一次

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选项可以被重载