Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultJSON(w io.Writer, i interface{})
- func ListCSV(writer io.Writer, many []map[string]interface{}, keys []string, noHeader bool)
- func ListJSON(w io.Writer, maps []map[string]interface{}, keys []string)
- func ListTable(writer io.Writer, many []map[string]interface{}, keys []string, noHeader bool)
- func MetadataCSV(writer io.Writer, m map[string]interface{}, keys []string, noHeader bool)
- func MetadataJSON(w io.Writer, m map[string]interface{}, keys []string)
- func MetadataTable(writer io.Writer, m map[string]interface{}, keys []string)
- type ErrArgs
- type ErrFlagFormatting
- type ErrMissingFlag
Constants ¶
View Source
const INDENT string = " "
INDENT is the indentation passed to json.MarshalIndent
Variables ¶
View Source
var ErrArgsFlagPrefix = "Argument error:"
ErrArgsFlagPrefix is the prefix for when a flag's argument is invalid.
View Source
var ErrFlagFormattingPrefix = "Invalid flag formatting:"
ErrFlagFormatting is the prefix for when a flag's format is invalid.
View Source
var ErrMissingFlagPrefix = "Missing flag:"
ErrMissingFlagPrefix is the prefix for when a required flag is missing.
Functions ¶
func DefaultJSON ¶
func MetadataCSV ¶
Types ¶
type ErrArgs ¶
type ErrArgs struct {
Msg string
}
ErrArgs is used when a flag's arguments are invalid.
type ErrFlagFormatting ¶
type ErrFlagFormatting struct {
Msg string
}
ErrFlagFormatting is used when a flag's format is invalid.
func (ErrFlagFormatting) Error ¶
func (e ErrFlagFormatting) Error() string
type ErrMissingFlag ¶
type ErrMissingFlag struct {
Msg string
}
ErrMissingFlag is used when a user doesn't provide a required flag.
func (ErrMissingFlag) Error ¶
func (e ErrMissingFlag) Error() string
Click to show internal directories.
Click to hide internal directories.