Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllClause ¶
type AllClause interface { Required() AllClause HiddenPath() AllClause HiddenContent() AllClause DefaultPath(values string) PathOrContentClause DefaultContent(values string) PathOrContentClause PathOrContentClause }
type Clause ¶
type Clause struct {
// contains filtered or unexported fields
}
Clause is a fluid interface used to build extended flags. This is useful for flags that are a bit of uncommon logic extension like fileOrContent.
func (*Clause) DefaultContent ¶
func (f *Clause) DefaultContent(value string) PathOrContentClause
func (*Clause) DefaultPath ¶
func (f *Clause) DefaultPath(value string) PathOrContentClause
func (*Clause) HiddenContent ¶
HiddenContent hides a flag from usage but still allows it to be used.
func (*Clause) HiddenPath ¶
HiddenPath hides a -file flag from usage but still allows it to be used.
func (*Clause) PathOrContent ¶
func (f *Clause) PathOrContent() *PathOrContent
type FlagClause ¶
type FlagClause interface {
Flag(name, help string) *kingpin.FlagClause
}
type PathOrContent ¶
type PathOrContent struct {
// contains filtered or unexported fields
}
PathOrContent is a flag type that defines two flags to fetch bytes. Either from file (*-file flag) or content (* flag).
func (*PathOrContent) Content ¶
func (p *PathOrContent) Content() ([]byte, error)
Content returns content of the file. Flag that specifies path has priority. It returns error if the content is empty and required flag is set to true.
type PathOrContentClause ¶
type PathOrContentClause interface {
PathOrContent() *PathOrContent
}
Click to show internal directories.
Click to hide internal directories.