cli

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotations

func Annotations(cmd string) map[string]string

Annotations returns set of annotations for cobra.Commands, specifically the command 'name' and command 'kind'

Types

type Runtime added in v0.15.0

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime represents the execution runtime for CLI.

func NewRuntime added in v0.15.0

func NewRuntime(config *print.Config) *Runtime

NewRuntime returns new instance of Runtime. If `config` is not provided default config will be used.

func (*Runtime) PreRunEFunc added in v0.15.0

func (r *Runtime) PreRunEFunc(cmd *cobra.Command, args []string) error

PreRunEFunc is the 'cobra.Command#PreRunE' function for 'formatter' commands. This function reads and normalizes flags and arguments passed through CLI execution.

func (*Runtime) RunEFunc added in v0.15.0

func (r *Runtime) RunEFunc(cmd *cobra.Command, args []string) error

RunEFunc is the 'cobra.Command#RunE' function for 'formatter' commands. It attempts to discover submodules, on `--recursive` flag, and generates the content for them as well as the root module.

Jump to

Keyboard shortcuts

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