reflect

package
v1.36.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ptr = reflect.Ptr
)

Alias a few consts

Variables

View Source
var (
	Append      = reflect.Append
	AppendSlice = reflect.AppendSlice
	// ArrayOf     = reflect.ArrayOf
	ChanOf    = reflect.ChanOf
	CopySlice = reflect.Copy
	DeepEqual = reflect.DeepEqual
	// FuncOf      = reflect.FuncOf
	Indirect  = reflect.Indirect
	MakeChan  = reflect.MakeChan
	MakeFunc  = reflect.MakeFunc
	MakeMap   = reflect.MakeMap
	MakeSlice = reflect.MakeSlice
	MapOf     = reflect.MapOf
	New       = reflect.New
	NewAt     = reflect.NewAt
	PtrTo     = reflect.PtrTo
	Select    = reflect.Select
	SliceOf   = reflect.SliceOf
	// StructOf    = reflect.StructOf
	TypeOf  = reflect.TypeOf
	ValueOf = reflect.ValueOf
	Zero    = reflect.Zero
)

Aliase reflect Funcs

Functions

func Copy

func Copy(src interface{}, dst interface{}) (err error)

func FieldNames

func FieldNames(s interface{}) []string

func IsPtrSlice

func IsPtrSlice(v reflect.Value) bool

Ensure this is a pointer to a slice

func IsSliceOfPtr

func IsSliceOfPtr(slice reflect.Value) bool

Ensure this is a slice of pointers

func IsZero

func IsZero(v reflect.Value) bool

func SetField

func SetField(ps reflect.Value, name string, value interface{}) error

Set field of addressable struct (pointer to struct)

Types

type Type

type Type reflect.Type

Alias a few reflect types

Jump to

Keyboard shortcuts

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