1- [ ![ PkgGoDev] ( https://img.shields.io/badge/go.dev-docs-007d9c?logo=go&logoColor=white&style=flat-square )] ( https://pkg.go.dev/github.com/docker/docgen )
2- [ ![ Test Status] ( https://img.shields.io/github/workflow/status/crazy-max/docgen/ build?label=test&logo=github&style=flat-square )] ( https://github.com/docker/docgen /actions?query=workflow%3Atest )
3- [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/docker/docgen )] ( https://goreportcard.com/report/github.com/docker/docgen )
1+ [ ![ PkgGoDev] ( https://img.shields.io/badge/go.dev-docs-007d9c?logo=go&logoColor=white&style=flat-square )] ( https://pkg.go.dev/github.com/docker/cli-docs-tool )
2+ [ ![ Test Status] ( https://img.shields.io/github/workflow/status/docker/cli-docs-tool/ build?label=test&logo=github&style=flat-square )] ( https://github.com/docker/cli-docs-tool /actions?query=workflow%3Atest )
3+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/docker/cli-docs-tool )] ( https://goreportcard.com/report/github.com/docker/cli-docs-tool )
44
55## About
66
@@ -26,7 +26,7 @@ We will use the example of `docker/buildx` and create a Go submodule in a
2626$ mkdir docs
2727$ cd ./docs
2828$ go mod init github.com/docker/buildx/docs
29- $ go get github.com/docker/docgen
29+ $ go get github.com/docker/cli-docs-tool
3030```
3131
3232Your ` go.mod ` should look like this:
@@ -37,7 +37,7 @@ module github.com/docker/buildx/docs
3737go 1.16
3838
3939require (
40- github.com/docker/docgen v0.0.0
40+ github.com/docker/cli-docs-tool v0.0.0
4141)
4242```
4343
@@ -54,7 +54,7 @@ import (
5454
5555 " github.com/docker/buildx/commands"
5656 " github.com/docker/cli/cli/command"
57- " github.com/docker/docgen "
57+ clidocstool " github.com/docker/cli-docs-tool "
5858 " github.com/spf13/cobra"
5959)
6060
@@ -75,7 +75,7 @@ func main() {
7575 }
7676
7777 cmd.AddCommand (commands.NewRootCmd (" buildx" , true , dockerCLI))
78- docgen .DisableFlagsInUseLine (cmd)
78+ clidocstool .DisableFlagsInUseLine (cmd)
7979
8080 cwd , _ := os.Getwd ()
8181 source := filepath.Join (cwd, sourcePath)
@@ -86,7 +86,7 @@ func main() {
8686 }
8787
8888 // Generate Markdown and YAML documentation to "source" folder
89- if err = docgen .GenTree (cmd, source); err != nil {
89+ if err = clidocstool .GenTree (cmd, source); err != nil {
9090 log.Printf (" ERROR: %+v " , err)
9191 }
9292}
@@ -95,7 +95,7 @@ func main() {
9595Here we create a new instance of Docker CLI with ` command.NewDockerCli ` and a
9696subcommand ` commands.NewRootCmd ` for ` buildx ` .
9797
98- Finally, we generate Markdown and YAML documentation with ` docgen .GenTree` .
98+ Finally, we generate Markdown and YAML documentation with ` clidocstool .GenTree` .
9999
100100``` console
101101$ go run main.go
0 commit comments