mirror of
https://github.com/rancher/k3k.git
synced 2026-03-06 03:31:17 +00:00
* wip * env var fix * cluster create * cluster create and delete * cluster list * cluster cmd * kubeconfig * policy create * policy delete and list, and added root commands * removed urfavecli from k3kcli * fix policy command * k3k-kubelet to cobra * updated docs * updated go.mod * updated test * added deletion * added cleanup and flake attempts * wip bind env * simplified config
32 lines
504 B
Go
32 lines
504 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path"
|
|
|
|
"github.com/spf13/cobra/doc"
|
|
|
|
"github.com/rancher/k3k/cli/cmds"
|
|
)
|
|
|
|
func main() {
|
|
// Instantiate the CLI application
|
|
k3kcli := cmds.NewRootCmd()
|
|
|
|
wd, err := os.Getwd()
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
outputDir := path.Join(wd, "docs/cli")
|
|
|
|
if err := doc.GenMarkdownTree(k3kcli, outputDir); err != nil {
|
|
fmt.Println("Error generating documentation:", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Println("Documentation generated at " + outputDir)
|
|
}
|