reflect

package
v3.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidStruct = errors.New("invalid struct specified")
)

Functions

func CopyDefaults added in v3.1.4

func CopyDefaults(a, b interface{})

CopyDefaults for a from b a and b should be pointers to the same kind of struct

func CopyFrom added in v3.1.4

func CopyFrom(a, b interface{})

CopyFrom sets the public members of a from b a and b should be pointers to structs a can be a different type from b Only the Fields which have the same name and assignable type on a and b will be set.

func IsEmpty

func IsEmpty(v reflect.Value) bool

func StructFields added in v3.1.4

func StructFields(src interface{}) ([]reflect.StructField, error)

func Zero

func Zero(src interface{}) (interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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