cliutil

package
v0.0.0-...-3353856 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("aborted by user")
View Source
var ErrNoEditor = fmt.Errorf("no available editor; please set the EDITOR environment variable and try again")

Functions

func AddSubcommands

func AddSubcommands(cmd *cobra.Command, subcommands ...*cobra.Command)

func BasePostRunE

func BasePostRunE(p *cobra.Command, args []string) error

func BasePreRunE

func BasePreRunE(cmd *cobra.Command, args []string) error

func EditInteractive

func EditInteractive[T proto.Message](spec T, comments ...string) (T, error)

func InitializeField

func InitializeField[T proto.Message](pt *T)

func JoinKeyValuePairs

func JoinKeyValuePairs(pairs map[string]string) []string

func LoadFromFile

func LoadFromFile[T proto.Message](spec T, path string) error

func ParseKeyValuePairs

func ParseKeyValuePairs(pairs []string) (map[string]string, error)

Parses strings of the form "key=value" into a map[string]string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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