structs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(source interface{}, target interface{}) error

Assign one pointers value to an other pointers value

func ExpectPointer

func ExpectPointer(i interface{}) error

ExpectPointer returns an error if the given interface is not a pointer

func ExpectStruct

func ExpectStruct(i interface{}) error

ExpectStruct returns an error if the given interface is not a struct

func ExpectStructPointer

func ExpectStructPointer(i interface{}) error

ExpectStructPointer returns an error if the given interface is not a pointer to a struct

func FQSN

func FQSN(i interface{}) (fqtn string, err error)

FQSN Fully qualified struct name

func GetField

func GetField(s interface{}, fieldName string) (value interface{}, err error)

GetField returns the value of some struct field (sub properties can be accessed by using dot notation: main.sub.value)

func GetStructPointerValue

func GetStructPointerValue(i interface{}) (value interface{}, err error)

GetStructPointerValue returns the (struct) value of a pointer to a struct

func IsPointer

func IsPointer(i interface{}) bool

IsPointer type check

func IsStruct

func IsStruct(i interface{}) bool

IsStruct type check

func IsStructPointer

func IsStructPointer(i interface{}) bool

IsStructPointer type check

Types

This section is empty.

Jump to

Keyboard shortcuts

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