diff --git a/README.md b/README.md index a712e03..51fa264 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,7 @@ Including running commands, color styles, data display, progress display, intera ## GoDoc -- [godoc for gopkg](https://pkg.go.dev/gopkg.in/gookit/gcli.v2) -- [godoc for github](https://pkg.go.dev/github.com/gookit/gcli/v3) +- [godoc](https://pkg.go.dev/github.com/gookit/gcli/v3) ## Install diff --git a/README.zh-CN.md b/README.zh-CN.md index a033126..90b6efe 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -44,8 +44,7 @@ The english introduction please ses **[README](README.md)** ## GoDoc -- [godoc for gopkg](https://pkg.go.dev/gopkg.in/gookit/gcli.v2) -- [godoc for github](https://pkg.go.dev/github.com/gookit/gcli/v3) +- [godoc](https://pkg.go.dev/github.com/gookit/gcli/v3) ## 安装 diff --git a/gflag/README.md b/gflag/README.md index d093771..1ff3e35 100644 --- a/gflag/README.md +++ b/gflag/README.md @@ -4,32 +4,44 @@ ## GoDoc -Please see https://pkg.go.dev/github.com/gookit/gcli/v2/gflag +Please see https://pkg.go.dev/github.com/gookit/gcli/v3/gflag ## Install ```shell -go get github.com/gookit/gcli/v2/gflag +go get github.com/gookit/gcli/v3/gflag ``` ## Usage -```go +```go file="demo.go" package main import ( "fmt" + "os" - "github.com/gookit/gcli/v2/gflag" + "github.com/gookit/gcli/v3/gflag" + "github.com/gookit/goutil" ) +var name string + func main() { gf := gflag.New("testFlags") + gf.StrOpt(&name, "name", "n", "", "") + gf.SetHandle(func(p *gflag.Parser) error { fmt.Println(p.Name()) return nil }) - gf.Parse() + goutil.MustOK(gf.Parse(os.Args[1:])) } ``` + +### Run + +```shell +go run demo.go +``` diff --git a/interact/README.md b/interact/README.md index 1899aef..5dd6017 100644 --- a/interact/README.md +++ b/interact/README.md @@ -14,12 +14,12 @@ command-line interactive util methods ## GoDoc -Please see https://pkg.go.dev/github.com/gookit/gcli/v2/interact +Please see https://pkg.go.dev/github.com/gookit/gcli/v3/interact ## Install ```shell -go get github.com/gookit/gcli/v2/interact +go get github.com/gookit/gcli/v3/interact ``` ## Select & Choice diff --git a/progress/README.md b/progress/README.md index 52774a5..d619510 100644 --- a/progress/README.md +++ b/progress/README.md @@ -10,7 +10,7 @@ Package progress provide terminal progress bar display. Such as: `Txt`, `Bar`, ` ## GoDoc -Please see https://pkg.go.dev/github.com/gookit/gcli/v2/progress +Please see https://pkg.go.dev/github.com/gookit/gcli/v3/progress ## Install diff --git a/show/README.md b/show/README.md index 63f0ccc..408e1a4 100644 --- a/show/README.md +++ b/show/README.md @@ -16,12 +16,12 @@ contains `section, panel, padding, helpPanel, table, tree, title, list, multiLis ## GoDoc -Please see https://pkg.go.dev/github.com/gookit/gcli/v2/show +Please see https://pkg.go.dev/github.com/gookit/gcli/v3/show ## Install ```shell -go get github.com/gookit/gcli/v2/show +go get github.com/gookit/gcli/v3/show ``` ## Related