structs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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