Skip to content

v0.0.6版本

Compare
Choose a tag to compare
@guonaihong guonaihong released this 03 May 08:42
· 53 commits to master since this release
8f9c7e9

新增全局配置,可以关闭usage信息里面的default值

issue 移步 #43

package main

import (
        "fmt"
        "github.com/guonaihong/clop"
)

type Hello struct {
        File string `clop:"-f; --file" usage:"file" default:"./my.log"`
}

func main() {

        clop.ShowUsageDefault = false // v0.0.6新加功能

        h := Hello{}
        clop.Bind(&h)
        fmt.Printf("%#v\n", h)
}