package
5.21.5+incompatible
Repository: https://github.com/sensu/sensu-go.git
Documentation: pkg.go.dev
# Functions
AddAllNamespace adds the '--all-namespaces' flag to the given command.
AddChunkSizeFlag adds the '--chunk-size' flag to the given command.
AddFieldSelectorFlag adds the '--field-selector' flag to the given command.
AddFormatFlag adds the format flag to the given command.
AddInteractiveFlag adds the '--interactive' flag to the given command.
AddLabelSelectorFlag adds the '--label-selector' flag to the given command.
ConfirmDelete confirm a deletion operation before it is completed.
ConfirmOptOut confirm an opt-out operation before it is completed.
DetectEmptyStdin determines if stdin is empty.
FlagHasChanged determines if the user has set the value of a flag, or left it to default.
GetChangedStringValueFlag returns the value of a flag that has been explicitely changed by the user, and not left to default.
GetCurrentUsername retrieves the username from the active JWT.
InputData returns the content of filename, if provided, or the standard input.
JoinErrors joins multiple errors messages.
ListOptionsFromFlags construct an appropriate ListOptions given a FlagSet.
Print displays.
PrintFormatted prints the provided interface in the specified format.
PrintJSON takes a record(s) and an io.Writer, converts the record to human- readable JSON (pretty-prints), and then prints the result to the given writer.
PrintList prints a list of resources to stdout with a title, if relevant.
PrintTitle prints a title for tabular format only.
PrintWrappedJSON takes a record(s) and Resource, converts the record to human-readable JSON (pretty-prints), wraps that JSON using types.Wrapper, and then prints the result to the given writer.
PrintWrappedJSONList takes a resource list and an io.Writer, converts the record to human-readable JSON (pretty-prints), wraps that JSON using types.Wrapper, and then prints the result to the given writer.
PrintYAML serializes the value v to yaml and writes the result to w.
SafeSplitCSV splits given string and trims and extraneous whitespace.
VerifyName ensures that (only) a name was provided in the arguments.
# Constants
HeaderWarning is the header key for entity limit warnings.
# Structs
Confirm an operation before it is completed.
ConfirmDestructiveOp presents prompt for a destructive operation.