internal

package
v0.0.0-...-4e58735 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ErrStructPointerExpected errors.Msg = "expected a pointer to a struct"

Variables

View Source
var (
	MarshalTextType   = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
	UnmarshalTextType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
	TimeDurationType  = reflect.TypeOf(time.Nanosecond)
)

Functions

func ParseAndSet

func ParseAndSet(rtyp reflect.Type, rval reflect.Value, str string) error

ParseAndSet parses str according to the value's type and kind.

func TraverseStruct

func TraverseStruct(v interface{}, h TraverseStructHandlerFunc) error

Types

type TraverseStructHandlerFunc

type TraverseStructHandlerFunc func(reflect.StructField, reflect.Value, []string) error

type UnsupportedError

type UnsupportedError struct {
	Type reflect.Type
}

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL