reflect

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: AGPL-3.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(rowsSlicePtr interface{}) interface{}

在入参的数组中创建并增加同类型的对象,并返回这个新增的对象指针

func Call

func Call(service interface{}, methodName string, args []interface{}) ([]interface{}, error)

func CreateArgs

func CreateArgs(service interface{}, methodName string) []interface{}

func GetFieldNames

func GetFieldNames(obj interface{}, recursive bool) (map[string]string, error)

func GetIndirectType

func GetIndirectType(value interface{}) reflect.Kind

func GetType

func GetType(value interface{}) reflect.Kind

func GetValue

func GetValue(obj interface{}, name string) (interface{}, error)

func Invoke

func Invoke(fn interface{}, args []interface{}) []interface{}

func IsPtr

func IsPtr(obj interface{}) bool

func IsSlice

func IsSlice(obj interface{}) bool

func New

func New(target interface{}) interface{}

反射创建新对象。

func Set

func Set(obj interface{}, name string, val string) error

func SetValue

func SetValue(obj interface{}, name string, val interface{}) error

func ToArray

func ToArray(entities interface{}) []interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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