Documentation ¶
Index ¶
- Constants
- func MarshalMapValue(m reflect.Value, sep1, sep2 string) (s string, err error)
- func MarshalSliceValue(slice reflect.Value, sep string) (s string, err error)
- func UnmarshalMap(src, sep1, sep2 string, ptrToMap interface{}) (err error)
- func UnmarshalSlice(src, sep string, ptrToSlice interface{}) (err error)
- type Option
- type Options
- func (opts Options) Apply(args []string, handleNotFound func(a string) bool) (natuals []string, err error)
- func (opts Options) ApplyLoose(args []string) (natuals []string, err error)
- func (opts Options) ApplyStrict(args []string) (natuals []string, err error)
- func (opts Options) Filter(f func(Option) bool) Options
- func (opts Options) Get(name string) *Option
- func (opts Options) Help() string
- func (opts Options) PrintHelp(w io.Writer)
- func (opts *Options) Reflect(o interface{}, name string, tags *Tags) (err error)
- func (opts *Options) ReflectValue(v reflect.Value, name string, tags Tags) (err error)
- func (opts Options) String() string
- type Tags
Constants ¶
View Source
const Separator = '.'
Variables ¶
This section is empty.
Functions ¶
func MarshalMapValue ¶
func MarshalSliceValue ¶
func UnmarshalMap ¶
func UnmarshalSlice ¶
Types ¶
type Option ¶
func (Option) ValueString ¶
type Options ¶
type Options []Option
Options is always sorted
func (Options) Apply ¶
func (opts Options) Apply(args []string, handleNotFound func(a string) bool) (natuals []string, err error)
Apply args into opts
func (Options) ApplyLoose ¶
func (Options) ApplyStrict ¶
func (*Options) ReflectValue ¶
Click to show internal directories.
Click to hide internal directories.