Update README
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
Родитель
9ab0e1f7e2
Коммит
88368f24e1
|
@ -16,5 +16,5 @@ Basic usage available in [example](example) folder.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Want to contribute to Buildx? Awesome! You can find information about
|
Want to contribute? Awesome! You can find information about contributing to
|
||||||
contributing to this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
|
this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
|
||||||
|
|
45
docgen.go
45
docgen.go
|
@ -1,3 +1,48 @@
|
||||||
|
// Doc generator specially crafted for Docker CLI plugins.
|
||||||
|
//
|
||||||
|
// Get started (buildx CLI):
|
||||||
|
// package main
|
||||||
|
//
|
||||||
|
// import (
|
||||||
|
// "log"
|
||||||
|
// "os"
|
||||||
|
// "path/filepath"
|
||||||
|
//
|
||||||
|
// "github.com/docker/buildx/commands"
|
||||||
|
// "github.com/docker/cli/cli/command"
|
||||||
|
// "github.com/docker/docgen"
|
||||||
|
// "github.com/spf13/cobra"
|
||||||
|
// )
|
||||||
|
//
|
||||||
|
// const sourcePath = "docs/reference/"
|
||||||
|
//
|
||||||
|
// func main() {
|
||||||
|
// log.SetFlags(0)
|
||||||
|
//
|
||||||
|
// dockerCLI, err := command.NewDockerCli()
|
||||||
|
// if err != nil {
|
||||||
|
// log.Printf("ERROR: %+v", err)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// cmd := &cobra.Command{
|
||||||
|
// Use: "docker [OPTIONS] COMMAND [ARG...]",
|
||||||
|
// Short: "The base command for the Docker CLI.",
|
||||||
|
// DisableAutoGenTag: true,
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// cmd.AddCommand(commands.NewRootCmd("buildx", true, dockerCLI))
|
||||||
|
// docgen.DisableFlagsInUseLine(cmd)
|
||||||
|
//
|
||||||
|
// cwd, _ := os.Getwd()
|
||||||
|
// source := filepath.Join(cwd, sourcePath)
|
||||||
|
//
|
||||||
|
// if err = os.MkdirAll(source, 0755); err != nil {
|
||||||
|
// log.Printf("ERROR: %+v", err)
|
||||||
|
// }
|
||||||
|
// if err = docgen.GenTree(cmd, source); err != nil {
|
||||||
|
// log.Printf("ERROR: %+v", err)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
package docgen
|
package docgen
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Загрузка…
Ссылка в новой задаче