Documentation
¶
Overview ¶
Package flag implements command line flag utilities for the cff command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHelp = flag.ErrHelp
ErrHelp reports that the user requested help with --help/-h.
Functions ¶
This section is empty.
Types ¶
type GetterPtr ¶
GetterPtr is satisfied by types that implement flag.Getter on their pointer receiver.
type InOutPair ¶
type InOutPair struct {
Input, Output string
}
InOutPair is a flag value that holds a pair of values. Two formats are supported:
--flag=INPUT --flag=INPUT=OUTPUT
For example,
--flag=foo.go=_gen/foo.go --flag=bar.go
type List ¶
List is a list of values received over the CLI.
Use this for flags that can be accepted multiple times.
func AsList ¶
AsList builds a flag.List from a pointer to a slice of flag.Getter values.
var list []SomeObject flagSet.Var(flag.AsList(&list), ...)
type Mode ¶
type Mode uint8
Mode specifies the code generation mode for cff.
const ( // BaseMode generates cff code without modification. BaseMode Mode = iota + 1 // SourceMapMode generates cff code with line directives to remap // generated code locations to source. SourceMapMode // ModifierMode generates cff code that preserves all original file line // locations by generating cff logic into separate modifier // functions. ModifierMode )
func (*Mode) UnmarshalText ¶
UnmarshalText unmarshals a Mode.
Click to show internal directories.
Click to hide internal directories.