# Functions
CheckInputHas1ArgsOr0ArgAndAll checks that the input has either: * 1 argument * 0 arguments and the --all flag.
CheckInputHas2ArgsOr1ArgAndAll checks that the input has either: * 2 arguments * 1 argument and the --all flag.
CloseResource try to close the resource and log error if occurs.
ConfirmAction is used to print a message to the writer and read the input from the reader.
DecodeDefinition takes a cobra command, a flagname and the desired structure on which to decode the contents of either the os.Stdin or the file contents.
DecodeFile takes a filename and the pointer to a structure, opening the file and dumping the contents into the desired structure.
DecodeFlags decodes the set flags of a cobra.Command and unpacks all the values to the specified pointer of the passed "output" structure.
FileOrStdin returns an error when the followong scenarios happen: * No Stdin and Flag value are empty.
GetHomePath obtains a home path from a GOOS architecture.
IncompatibleFlags checks if both flags have been specified, and if so returns an error.
MinimumNArgsAndUUID ensures that the command has at least N number of arguments and the first argument is 32 characters long.
NoneOrBothFlags checks if none or both flags have been specified, and if not returns an error.
OpenFile encapsulates the stat and os.OpenFile into its own function.
ParseBoolP parses a string flag that is meant to be a boolean with 3 values: * true * false * nil.
ParseQueryDSLFile parses a file that contains a query dsl json and returns the corresponding binary representation.
# Variables
ErrCannotSpecifyEnableAndDisable is returned when --enable and --disable are set.
ErrEmptyStdinAndFile thrown when either the Sdin or the file are empty.
ErrMustSpecifyOneOfEnableOrDisable is returned when --enable or --disable must be set.
ErrNodefinitionLoaded is returned by DecodeDefinition when no reader has been returned from either File or Stdin.
# Type aliases
ErrorLoggerFunc is the callback for logging error.