Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-08-02 19:15:55 +02:00 коммит произвёл Sebastiaan van Stijn
Родитель 9ab0e1f7e2
Коммит 88368f24e1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 76698F39D527CE8C
2 изменённых файлов: 47 добавлений и 2 удалений

Просмотреть файл

@ -16,5 +16,5 @@ Basic usage available in [example](example) folder.
## Contributing
Want to contribute to Buildx? Awesome! You can find information about
contributing to this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
Want to contribute? Awesome! You can find information about contributing to
this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)

Просмотреть файл

@ -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
import (