cmd

package
v0.0.0-...-332fa53 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValue

func GetValue(cmd *cobra.Command, key string) (interface{}, bool)

GetValue retrieves a value from the shared store from a specific app based on the root "cmd".

func New

func New(buildRevision, buildTime string) *cobra.Command

New returns the root command.

func RunCommand

func RunCommand(from *cobra.Command, commandToRun string, args ...string) error

RunCommand runs a command.

func SetValue

func SetValue(cmd *cobra.Command, key string, value interface{})

SetValue sets a value to the shared store for specific app based on the root "cmd".

Types

type HelpTemplate

type HelpTemplate struct {
	BuildTime            string
	BuildRevision        string
	ShowGoRuntimeVersion bool

	Template fmt.Stringer
}

HelpTemplate is the structure which contaisn the variables for the help command.

func (HelpTemplate) String

func (h HelpTemplate) String() string

Jump to

Keyboard shortcuts

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