Documentation
¶
Index ¶
- func FormatBool(a *Argument[bool]) string
- func FormatFriendlyFireRate(a *Argument[float64]) string
- func FormatGameDifficulty(a *Argument[int]) string
- func FormatGameLength(a *Argument[int]) string
- func FormatGameMode(a *Argument[string]) string
- func FormatSpecimenType(a *Argument[string]) string
- func ParseDuration(a *Argument[time.Duration]) (time.Duration, error)
- func ParseExistingDir(a *Argument[string]) (string, error)
- func ParseFriendlyFireRate(a *Argument[float64]) (float64, error)
- func ParseGameDifficulty(raw string) func(a *Argument[int]) (int, error)
- func ParseGameLength(raw string) func(a *Argument[int]) (int, error)
- func ParseGameMode(a *Argument[string]) (string, error)
- func ParseIP(a *Argument[string]) (string, error)
- func ParseIntRange(a *Argument[int], min int, max int) func(a *Argument[int]) (int, error)
- func ParseLogFileFormat(a *Argument[string]) (string, error)
- func ParseLogLevel(a *Argument[string]) (string, error)
- func ParseMail(a *Argument[string]) (string, error)
- func ParseNonEmptyStr(a *Argument[string]) (string, error)
- func ParsePassword(a *Argument[string]) (string, error)
- func ParsePort(a *Argument[int]) (int, error)
- func ParsePositiveInt(a *Argument[int]) (int, error)
- func ParseSpecimenType(a *Argument[string]) (string, error)
- func ParseURL(a *Argument[string]) (string, error)
- func ParseUnsignedInt(a *Argument[int]) (int, error)
- type Argument
- func (a *Argument[T]) FormattedValue() string
- func (a *Argument[T]) IsSensitive() bool
- func (a *Argument[T]) Name() string
- func (a *Argument[T]) Parse() error
- func (a *Argument[T]) RawValue() T
- func (a *Argument[T]) SetFormatterFunction(f FormatFunction[T])
- func (a *Argument[T]) SetParserFunction(f ParseFunction[T])
- func (a *Argument[T]) String() string
- func (a *Argument[T]) Value() T
- type FormatFunction
- type ParsableArgument
- type ParseFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBool ¶
func FormatFriendlyFireRate ¶
func FormatGameDifficulty ¶
func FormatGameLength ¶
func FormatGameMode ¶
func FormatSpecimenType ¶
func ParseIntRange ¶
Types ¶
type Argument ¶
type Argument[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any](name string, rawValue T, parseFunc ParseFunction[T], formatFunc FormatFunction[T], sensitive bool) *Argument[T]
func (*Argument[T]) FormattedValue ¶
func (*Argument[T]) IsSensitive ¶
func (*Argument[T]) SetFormatterFunction ¶
func (a *Argument[T]) SetFormatterFunction(f FormatFunction[T])
func (*Argument[T]) SetParserFunction ¶
func (a *Argument[T]) SetParserFunction(f ParseFunction[T])
type FormatFunction ¶
type ParsableArgument ¶
type ParseFunction ¶
Click to show internal directories.
Click to hide internal directories.