Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdClause ¶
type CmdClause interface {
Flag(name, help string) *kingpin.FlagClause
}
func HiddenCmdClause ¶ added in v0.13.0
HiddenCmdClause returns CmdClause that hides created flags.
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 RegisterPathOrContent ¶
func RegisterPathOrContent(cmd CmdClause, flagName string, help string, required bool) *PathOrContent
RegisterPathOrContent registers PathOrContent flag in kingpinCmdClause.
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.
Click to show internal directories.
Click to hide internal directories.