# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AddDryRunFlag adds dry-run flag to a command.
No description provided by the author
No description provided by the author
AddFromEnvFile processes an env file allows a generic addTo to handle the collection of key value pairs or returns an error.
No description provided by the author
AddKustomizeFlag adds kustomize flag to a command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AddSourceToErr adds handleResourcePrefix and source string to error message.
No description provided by the author
No description provided by the author
BehaviorOnFatal allows you to override the default behavior when a fatal error occurs, which is to call os.Exit(code).
CheckDiffErr prints a user friendly error to STDERR and exits with a non-zero and non-one exit code.
CheckErr prints a user friendly error to STDERR and exits with a non-zero exit code.
DefaultBehaviorOnFatal allows you to undo any previous override.
DefaultSubCommandRun prints a command's help string to the specified output if no arguments (sub-commands) are provided, or a usage error otherwise.
Difference removes any elements of subArray from fullArray and returns the result.
DumpReaderToFile writes all data from the given io.Reader to the specified file (usually for temporary use).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Assumes the flag has a default value.
Assumes the flag has a default value.
Assumes the flag has a default value.
No description provided by the author
GetFlagStringArray can be used to accept multiple argument with flag repetition (e.g.
GetFlagStringSlice can be used to accept multiple argument with flag repetition (e.g.
No description provided by the author
No description provided by the author
GetResourcesAndPairs retrieves resources and "KEY=VALUE or KEY-" pair args from given args.
No description provided by the author
No description provided by the author
No description provided by the author
IsSiblingCommandExists receives a pointer to a cobra command and a target string.
JSONPatch converts the passed in object to JSON, performs an RFC6902 JSON Patch using operations specified in the fragment, and returns the resulting object.
ManualStrip is used for dropping comments from a YAML file.
Merge converts the passed in object to JSON, merges the fragment into it using an RFC7396 JSON Merge Patch, and returns the resulting object TODO: merge assumes JSON serialization, and does not properly abstract API retrieval.
MultilineError returns a string representing an error that splits sub errors into their own lines.
MultipleErrors returns a newline delimited string containing the prefix and referenced errors in standard form.
No description provided by the author
No description provided by the author
ParsePairs retrieves new and remove pairs (if supportRemove is true) from "KEY=VALUE or KEY-" pair args.
PrintErrorWithCauses prints an error's kind, name, and each of the error's causes in a new line.
PrintFlagsWithDryRunStrategy sets a success message at print time for the dry run strategy
TODO(juanvallejo): This can be cleaned up even further by creating a PrintFlags struct that binds the --dry-run flag, and whose ToPrinter method returns a printer that understands how to print this success message.
RequireNoArguments exits with a usage error if extra arguments are provided.
StandardErrorMessage translates common errors into a human readable message, or returns false if the error is not one of the recognized types.
StrategicMerge converts the passed in object to JSON, merges the fragment into it using a Strategic Merge Patch, and returns the resulting object.
StripComments will transform a YAML file into JSON, thus dropping any comments in it.
SuggestAPIResources returns a suggestion to use the "api-resources" command to retrieve a supported list of resources.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
DebugCustomProfile should be dropped in 1.34.
No description provided by the author
No description provided by the author
No description provided by the author
DryRunClient, or client-side dry-run, indicates the client will prevent making mutating calls such as CREATE, PATCH, and DELETE.
DryRunNone indicates the client will make all mutating calls.
DryRunServer, or server-side dry-run, indicates the client will send mutating calls to the APIServer with the dry-run parameter to prevent persisting changes.
No description provided by the author
No description provided by the author
OverrideTypeJSON will use an RFC6902 JSON Patch to alter the generated output.
OverrideTypeMerge will use an RFC7396 JSON Merge Patch to alter the generated output.
OverrideTypeStrategic will use a Strategic Merge Patch to alter the generated output.
No description provided by the author
No description provided by the author
# Variables
ErrExit may be passed to CheckError to instruct it to output nothing but exit with status code 1.
ScaleClientFn gives a way to easily override the function for unit testing if needed.
# Structs
MatchVersionFlags is for setting the "match server version" function.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Factory provides abstractions that allow the Kubectl command to be extended across multiple types of resources and different API sets.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
ScaleClientFunc provides a ScalesGetter.