refl

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStructFieldValueByTagName

func GetStructFieldValueByTagName(c interface{}, tagType string, tagName string) (interface{}, error)

GetStructFieldValueByTagName - Returns a value ptr to struct field by tag type and tag name

func GetStructFieldsMapperByTagName

func GetStructFieldsMapperByTagName(c interface{}, tagName string) (fieldsName []string, fieldsValue []interface{})

GetStructFieldsMapperByTagName - Returns two slices filtered by a tag name, the first is a slice of strings with struct tags value, the seconds is a slice of ptr to struct fields value

func GetStructFieldsNameAndTagByTagName

func GetStructFieldsNameAndTagByTagName(c interface{}, tagName string) (tagFields []string, structFields []string)

GetStructFieldsNameAndTagByTagName - Returns two slices filtered by a tag name, the first is a slice of strings with struct tags value, the seconds is a slice of string with struct fields name

func GetType

func GetType(val interface{}) (typeName string)

GetType - Returns the name of var, appends "*" if var is ptr to value

Types

This section is empty.

Jump to

Keyboard shortcuts

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