shared

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags struct {
	Json bool
}

Functions

func AddCommand

func AddCommand(parent *cobra.Command, action func([]string) error, use string, help string, setup func(*cobra.Command))

func DefaultPreRun

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

func ExitWithResult added in v0.8.2

func ExitWithResult(result any, key string, message string)

func ExitWithResults added in v0.8.2

func ExitWithResults[T any](results []T, key, noun, verb, singular, plural string)

func ExitWithStatus added in v0.8.2

func ExitWithStatus(err error)

func MakeGroupCommand

func MakeGroupCommand(parentGroup *cobra.Group, use string, help string) *cobra.Command

func OmitEmpty added in v0.8.11

func OmitEmpty(v any) (isEmpty bool)

func PrintIndented added in v0.8.2

func PrintIndented(v any)

func PrintItem added in v0.8.2

func PrintItem(msg string)

func PrintProgress added in v0.8.2

func PrintProgress(msg string)

func ProjectPreRun

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

func ReadJSONFile added in v0.8.11

func ReadJSONFile[T any](sourcePath string) (obj T, err error)

func StandalonePreRun added in v0.8.11

func StandalonePreRun(cmd *cobra.Command, _ []string) error

func WriteJSONFile added in v0.8.11

func WriteJSONFile(path string, object map[string]any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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