Documentation ¶
Index ¶
- type Parameter
- func Bool(name, desc string) Parameter[bool]
- func Bytes(name, desc string, defaults []byte) Parameter[[]byte]
- func Duration(name, desc string, defaults time.Duration) Parameter[time.Duration]
- func Int(name, desc string, defaults int) Parameter[int]
- func NewParameter[T any](name, desc string, defaults T, parser Parser[T]) Parameter[T]
- func String(name, desc, defaults string) Parameter[string]
- type Parameters
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter[T any] struct { // contains filtered or unexported fields }
func NewParameter ¶
func (*Parameter[T]) Get ¶
func (p *Parameter[T]) Get(params *Parameters) T
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
func FromValues ¶
func FromValues(values map[string]string) *Parameters
FromValues instantiates parameters with a cope of values.
func (*Parameters) Update ¶
func (p *Parameters) Update(values map[string]string)
Click to show internal directories.
Click to hide internal directories.