Documentation
¶
Index ¶
- func Complex128(s string) (complex128, error)
- func Complex64(s string) (complex64, error)
- func Map(s string, mapType reflect.Type) (reflect.Value, error)
- func String(str string, t reflect.Type) (reflect.Value, error)
- func StringSet(s string) (map[string]struct{}, error)
- func StringSlice(s string) ([]string, error)
- func StringStringSliceMap(s string) (map[string][]string, error)
- type NumberError
- type OverflowError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complex128 ¶
func Complex128(s string) (complex128, error)
Complex128 delegates to strconv.ParseComplex for go >= 1.15.
func Map ¶
Map converts a string representation of a map with concrete values as keys and vals into a reflect.Value representing that map.
func String ¶
String casts the provided string into the provided type, returning the result in a reflect.Value.
func StringSet ¶
StringSet splits a comma separated string and constructs a map[string]struct{} to represent a set
func StringSlice ¶
StringSlice splits a comma separated string and constructs a slice
Types ¶
type NumberError ¶
type NumberError struct {
// contains filtered or unexported fields
}
NumberError represents an error when parsing a string to generate a numeric type.
func (*NumberError) Error ¶
func (e *NumberError) Error() string
func (*NumberError) Unwrap ¶
func (e *NumberError) Unwrap() error
type OverflowError ¶
type OverflowError struct {
// contains filtered or unexported fields
}
OverflowError represents an overflow when casting to a numeric type.
func (*OverflowError) Error ¶
func (e *OverflowError) Error() string
func (*OverflowError) Unwrap ¶
func (e *OverflowError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.