Documentation ¶
Overview ¶
Package option helps to read values from option maps.
This package is a work in progress and makes no API stability promises.
Index ¶
- func Bool(opts map[string]interface{}, field string) (value bool, ok bool, err error)
- func Hash(opts map[string]interface{}, field string) (value map[string]interface{}, ok bool, err error)
- func HashString(opts map[string]interface{}, field string) (value map[string]string, ok bool, err error)
- func Int(opts map[string]interface{}, field string) (value int, ok bool, err error)
- func SliceHash(opts map[string]interface{}, field string) (value []map[string]interface{}, ok bool, err error)
- func SliceHashString(opts map[string]interface{}, field string) (value []map[string]string, ok bool, err error)
- func SliceString(opts map[string]interface{}, field string) (value []string, ok bool, err error)
- func String(opts map[string]interface{}, field string) (value string, ok bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
func Hash(opts map[string]interface{}, field string) (value map[string]interface{}, ok bool, err error)
Hash returns the field passed as a map of interfaces in value, ok if exists.
func HashString ¶
func HashString(opts map[string]interface{}, field string) (value map[string]string, ok bool, err error)
HashString returns the field passed as a map of strings in value, ok if exists.
func SliceHash ¶
func SliceHash(opts map[string]interface{}, field string) (value []map[string]interface{}, ok bool, err error)
SliceHash returns the field passed as a slice of map of interfaces in value, ok if exists.
func SliceHashString ¶
func SliceHashString(opts map[string]interface{}, field string) (value []map[string]string, ok bool, err error)
SliceHashString returns the field passed as a slice of map of strings in value, ok if exists.
func SliceString ¶
SliceString returns the field passed as a slice of strings in value, ok if exists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.