refl

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyPointerSlice

func CopyPointerSlice(ptrA interface{}, ptrB interface{})

func CreatePointerToSliceOfTypeAndSize

func CreatePointerToSliceOfTypeAndSize(value interface{}, size int) interface{}

func GetTypedValue

func GetTypedValue(value interface{}) reflect.Value

func InitializeMapsAndSlices

func InitializeMapsAndSlices(value interface{})

func InterfaceToInterfaceSlice

func InterfaceToInterfaceSlice(in interface{}) ([]interface{}, error)

func InterfaceToMapInterfaceInterface

func InterfaceToMapInterfaceInterface(m interface{}) (map[interface{}]interface{}, error)

func IsPointerToMap

func IsPointerToMap(value interface{}) bool

func IsPointerToSlice

func IsPointerToSlice(value interface{}) bool

func IsPointerToStruct

func IsPointerToStruct(value interface{}) bool

func IsSlice

func IsSlice(value interface{}) bool

func IsStructOrPointerToStruct

func IsStructOrPointerToStruct(value interface{}) bool

func ResolveBaseType

func ResolveBaseType(value interface{}) reflect.Type

func ResolveBaseTypeAndValue

func ResolveBaseTypeAndValue(value interface{}) (reflect.Type, reflect.Value)

func ResolveValueTo

func ResolveValueTo(value interface{}, kind reflect.Kind) (reflect.Type, reflect.Value)

func SliceInterfaceIterator

func SliceInterfaceIterator(slice interface{}) *sliceIterator

Types

type Map

type Map struct {
	// contains filtered or unexported fields
}

func MapOf

func MapOf(m interface{}) (*Map, error)

func (*Map) NewElement

func (m *Map) NewElement() interface{}

func (*Map) Set

func (m *Map) Set(key interface{}, value interface{}) error

type Slice

type Slice struct {
	// contains filtered or unexported fields
}

func SliceOf

func SliceOf(slice interface{}) (*Slice, error)

func (*Slice) Append

func (s *Slice) Append(elem interface{}) error

func (*Slice) NewElement

func (s *Slice) NewElement() interface{}

Jump to

Keyboard shortcuts

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