apply

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package apply provides the apply command for the minder CLI

Index

Constants

This section is empty.

Variables

View Source
var DocsCmd = &cobra.Command{
	Use:   "docs",
	Short: "Generates documentation for the client",
	Long:  `Generates documentation for the client.`,
	PreRun: func(cmd *cobra.Command, args []string) {
		err := viper.BindPFlags(cmd.Flags())
		util.ExitNicelyOnError(err, "Error binding flags")
	},
	Run: func(cmd *cobra.Command, args []string) {

		app.RootCmd.DisableAutoGenTag = true

		prefix := func(filename string) string {

			filename = filepath.Base(filename)
			cmdString := strings.ReplaceAll(strings.TrimSuffix(filename, ".md"), "_", " ")
			return fmt.Sprintf("---\ntitle: %s\n---\n", cmdString)
		}
		identity := func(s string) string { return s }
		err := doc.GenMarkdownTreeCustom(app.RootCmd, "./docs/docs/ref/cli/commands", prefix, identity)
		if err != nil {
			panic(err)
		}
	},
}

DocsCmd generates documentation

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL