cli

package
v0.0.0-...-22a6844 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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

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

Runtime represents the execution runtime for CLI.

func NewRuntime

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

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

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