Documentation
¶
Overview ¶
Package cli manages loading and testing configuration for serializing and deserializing objects from the command line.
Index ¶
- Constants
- Variables
- func CheckInput(v *viper.Viper, formats []string) error
- func CheckOutput(v *viper.Viper, formats []string) error
- func InitInputFlags(flag *pflag.FlagSet, formats []string)
- func InitOutputFlags(flag *pflag.FlagSet, formats []string)
- type ErrInvalidInputFormat
- type ErrInvalidOutputFormat
- type ErrMissingInputFormat
- type ErrMissingOutputFormat
Constants ¶
View Source
const ( FlagInputURI string = "input-uri" FlagInputCompression string = "input-compression" FlagInputFormat string = "input-format" FlagInputHeader string = "input-header" FlagInputLimit string = "input-limit" FlagInputComment string = "input-comment" FlagInputLazyQuotes string = "input-lazy-quotes" FlagInputTrim string = "input-trim" FlagInputReaderBufferSize string = "input-reader-buffer-size" FlagInputSkipLines string = "input-skip-lines" FlagInputLineSeparator string = "input-line-separator" FlagInputDropCR string = "input-drop-cr" FlagInputEscapePrefix string = "input-escape-prefix" FlagInputUnescapeColon string = "input-unescape-colon" FlagInputUnescapeEqual string = "input-unescape-equal" FlagInputUnescapeSpace string = "input-unescape-space" FlagInputUnescapeNewLine string = "input-unescape-new-line" DefaultSkipLines int = 0 DefaultInputLimit int = -1 )
View Source
const ( FlagOutputURI string = "output-uri" FlagOutputCompression string = "output-compression" FlagOutputFormat string = "output-format" FlagOutputPretty string = "output-pretty" FlagOutputHeader string = "output-header" FlagOutputLimit string = "output-limit" FlagOutputAppend string = "output-append" FlagOutputOverwrite string = "output-overwrite" FlagOutputBufferMemory string = "output-buffer-memory" FlagOutputMkdirs string = "output-mkdirs" FlagOutputPassphrase string = "output-passphrase" FlagOutputSalt string = "output-salt" FlagOutputDecimal string = "output-decimal" FlagOutputKeyLower string = "output-key-lower" FlagOutputKeyUpper string = "output-key-upper" FlagOutputValueLower string = "output-value-lower" FlagOutputValueUpper string = "output-value-upper" FlagOutputNoDataValue string = "output-no-data-value" FlagOutputLineSeparator string = "output-line-separator" FlagOutputKeyValueSeparator string = "output-key-value-separator" FlagOutputExpandHeader string = "output-expand-header" FlagOutputEscapePrefix string = "output-escape-prefix" FlagOutputEscapeColon string = "output-escape-colon" FlagOutputEscapeEqual string = "output-escape-equal" FlagOutputEscapeNewLine string = "output-escape-new-line" FlagOutputEscapeSpace string = "output-escape-space" FlagOutputSorted string = "output-sorted" FlagOutputReversed string = "output-reversed" DefaultOutputLimit = -1 )
Variables ¶
View Source
var ( ErrMissingLineSeparator = errors.New("line separator cannot be blank") ErrMissingEscapePrefix = errors.New("escape prefix is missing") )
View Source
var (
DefaultInputHeader = []string{}
)
View Source
var (
DefaultOutputHeader = []string{}
)
Functions ¶
func CheckInput ¶
CheckInput checks the output configuration.
func CheckOutput ¶
CheckOutput checks the output configuration.
func InitInputFlags ¶
Initialize input flags
func InitOutputFlags ¶
Initialize output flags
Types ¶
type ErrInvalidInputFormat ¶
func (ErrInvalidInputFormat) Error ¶
func (e ErrInvalidInputFormat) Error() string
type ErrInvalidOutputFormat ¶
func (ErrInvalidOutputFormat) Error ¶
func (e ErrInvalidOutputFormat) Error() string
type ErrMissingInputFormat ¶
type ErrMissingInputFormat struct {
Expected []string
}
func (ErrMissingInputFormat) Error ¶
func (e ErrMissingInputFormat) Error() string
type ErrMissingOutputFormat ¶
type ErrMissingOutputFormat struct {
Expected []string
}
func (ErrMissingOutputFormat) Error ¶
func (e ErrMissingOutputFormat) Error() string
Click to show internal directories.
Click to hide internal directories.