Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format string
Format is an output format such as json or xml.
const ( Text Format = "text" JSON Format = "json" JSONL Format = "jsonl" JSONA Format = "jsona" HTML Format = "html" Markdown Format = "markdown" XLSX Format = "xlsx" XML Format = "xml" CSV Format = "csv" TSV Format = "tsv" Raw Format = "raw" YAML Format = "yaml" )
Output format values.
func (*Format) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Opt ¶ added in v0.36.0
Opt is an options.Opt for format.Format.
func NewOpt ¶ added in v0.36.0
func NewOpt(key string, flag *options.Flag, defaultVal Format, validFn func(Format) error, usage, help string, ) Opt
NewOpt returns a new format.Opt instance. If validFn is non-nil, it is executed against possible values.
func (Opt) DefaultAny ¶ added in v0.36.0
DefaultAny implements options.Opt.
func (Opt) Get ¶ added in v0.36.0
Get returns op's value in o. If o is nil, or no value is set, op's default value is returned.
Click to show internal directories.
Click to hide internal directories.