reflectutil

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSet

func CanSet(val reflect.Value) bool

func FindField

func FindField(val reflect.Value, fieldName string) (reflect.Value, reflect.StructField, bool)

func GetElem

func GetElem(data interface{}) reflect.Value

func GetFieldElem

func GetFieldElem(val reflect.Value, fieldName string) reflect.Value

func GetFieldValue

func GetFieldValue(data interface{}, fieldName string) interface{}

func IsFieldSlice

func IsFieldSlice(data interface{}, fieldName string) bool

func IsPtr

func IsPtr(val reflect.Value) bool

func IsScanner

func IsScanner(field reflect.Value) (sql.Scanner, bool)

func IsValuer

func IsValuer(field reflect.Value) (driver.Valuer, bool)

IsValuer check the filed implement driver.Valuer or not

func MakeSlice

func MakeSlice(data interface{}, cap int) reflect.Value

func TryScan

func TryScan(field reflect.Value, data interface{}) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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