Documentation ¶
Index ¶
Constants ¶
const ( FeatureFlagName = "feature" ExcludeFeatureFlagName = "exclude" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncludeExcludeStringSet ¶
type IncludeExcludeStringSet struct {
// contains filtered or unexported fields
}
IncludeExcludeStringSet allows unsetting strings seen in a StringSet.
func NewFeatureFlag ¶
func NewFeatureFlag(features []string) *IncludeExcludeStringSet
NewFeatureFlag defines two flags, FeatureFlagName and ExcludeFeatureFlagName, to allow setting and excluding certain features.
func NewIncludeExcludeStringSet ¶
func NewIncludeExcludeStringSet(include *StringSet, name, usage string, all []string) *IncludeExcludeStringSet
NewIncludeExcludeStringSet returns a new NewIncludeExcludeStringSet.
func (*IncludeExcludeStringSet) IsSet ¶
func (es *IncludeExcludeStringSet) IsSet(s string) bool
func (*IncludeExcludeStringSet) Len ¶
func (es *IncludeExcludeStringSet) Len() int
func (*IncludeExcludeStringSet) Set ¶
func (es *IncludeExcludeStringSet) Set(s string) error
func (*IncludeExcludeStringSet) String ¶
func (es *IncludeExcludeStringSet) String() string
func (*IncludeExcludeStringSet) Strings ¶
func (es *IncludeExcludeStringSet) Strings() []string
type LogrusLevel ¶
LogrusLevel is a flag that accepts logrus logging levels as strings.
func NewLogrusLevel ¶
func NewLogrusLevel(name, value, usage string) *LogrusLevel
func (*LogrusLevel) Set ¶
func (l *LogrusLevel) Set(s string) error
func (*LogrusLevel) String ¶
func (l *LogrusLevel) String() string
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
StringSet is a type to be used with the standard library's flag.Var function as a custom flag value, similar to "github.com/urfave/cli".StringSet, but it only tracks unique instances.
It takes either a comma-separated list of strings, or repeated invocations.
func NewStringSet ¶
NewStringSet returns a new StringSetFlag with an empty set.