Skip to content

Commit c3bbaa4

Browse files
authored
Merge pull request #5 from crazy-max/rename
Rename project
2 parents f1ab115 + 40b1fb6 commit c3bbaa4

19 files changed

+42
-87
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contribute to the docgen project
1+
# Contribute to the cli-docs-tool project
22

33
This page contains information about reporting issues as well as some tips and
44
guidelines useful to experienced open source contributors.
@@ -23,7 +23,7 @@ A great way to contribute to the project is to send a detailed report when you
2323
encounter an issue. We always appreciate a well-written, thorough bug report,
2424
and will thank you for it!
2525

26-
Check that [our issue database](https://github.com/docker/docgen/issues)
26+
Check that [our issue database](https://github.com/docker/cli-docs-tool/issues)
2727
doesn't already include that problem or suggestion before submitting an issue.
2828
If you find a match, you can use the "subscribe" button to get notified on
2929
updates. Do *not* leave random "+1" or "I have this too" comments, as they

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

3232
Your `go.mod` should look like this:
@@ -37,7 +37,7 @@ module github.com/docker/buildx/docs
3737
go 1.16
3838
3939
require (
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() {
9595
Here we create a new instance of Docker CLI with `command.NewDockerCli` and a
9696
subcommand `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

docgen.go renamed to clidocstool.go

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 docgen authors
1+
// Copyright 2017 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,52 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// Doc generator specially crafted for Docker CLI plugins.
16-
//
17-
// Get started (buildx CLI):
18-
// package main
19-
//
20-
// import (
21-
// "log"
22-
// "os"
23-
// "path/filepath"
24-
//
25-
// "github.com/docker/buildx/commands"
26-
// "github.com/docker/cli/cli/command"
27-
// "github.com/docker/docgen"
28-
// "github.com/spf13/cobra"
29-
// )
30-
//
31-
// const sourcePath = "docs/reference/"
32-
//
33-
// func main() {
34-
// log.SetFlags(0)
35-
//
36-
// dockerCLI, err := command.NewDockerCli()
37-
// if err != nil {
38-
// log.Printf("ERROR: %+v", err)
39-
// }
40-
//
41-
// cmd := &cobra.Command{
42-
// Use: "docker [OPTIONS] COMMAND [ARG...]",
43-
// Short: "The base command for the Docker CLI.",
44-
// DisableAutoGenTag: true,
45-
// }
46-
//
47-
// cmd.AddCommand(commands.NewRootCmd("buildx", true, dockerCLI))
48-
// docgen.DisableFlagsInUseLine(cmd)
49-
//
50-
// cwd, _ := os.Getwd()
51-
// source := filepath.Join(cwd, sourcePath)
52-
//
53-
// if err = os.MkdirAll(source, 0755); err != nil {
54-
// log.Printf("ERROR: %+v", err)
55-
// }
56-
// if err = docgen.GenTree(cmd, source); err != nil {
57-
// log.Printf("ERROR: %+v", err)
58-
// }
59-
// }
60-
package docgen
15+
package clidocstool
6116

6217
import (
6318
"github.com/spf13/cobra"

docgen_md.go renamed to clidocstool_md.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 docgen authors
1+
// Copyright 2021 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package docgen
15+
package clidocstool
1616

1717
import (
1818
"bytes"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 docgen authors
1+
// Copyright 2021 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package docgen
15+
package clidocstool
1616

1717
import (
1818
"io/ioutil"

docgen_yaml.go renamed to clidocstool_yaml.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 docgen authors
1+
// Copyright 2017 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package docgen
15+
package clidocstool
1616

1717
import (
1818
"fmt"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 docgen authors
1+
// Copyright 2017 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package docgen
15+
package clidocstool
1616

1717
import (
1818
"io/ioutil"

docker-bake.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 docgen authors
1+
// Copyright 2021 cli-docs-tool authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

example/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ The following example will generate YAML and Markdown docs for
44
[Docker buildx](https://github.com/docker/buildx) CLI.
55

66
```console
7-
git clone https://github.com/docker/docgen
8-
cd docgen/example/
7+
git clone https://github.com/docker/cli-docs-tool
8+
cd cli-docs-tool/example/
99
go mod download
1010
go run main.go
1111
```

example/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
module github.com/docker/docgen/example
1+
module github.com/docker/cli-docs-tool/example
22

33
go 1.16
44

55
require (
66
github.com/docker/buildx v0.6.0
77
github.com/docker/cli v20.10.7+incompatible
8-
github.com/docker/docgen v0.0.0
8+
github.com/docker/cli-docs-tool v0.0.0
99
github.com/spf13/cobra v1.2.1
1010
)
1111

1212
replace (
1313
github.com/docker/cli => github.com/docker/cli v20.10.3-0.20210702143511-f782d1355eff+incompatible
1414
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20210609100121-ef4d47340142+incompatible
15-
github.com/docker/docgen => ../
15+
github.com/docker/cli-docs-tool => ../
1616
)

0 commit comments

Comments
 (0)