package reflectlite
Import Path
internal/reflectlite (on golang.org and go.dev)
Dependency Relation
imports 3 packages, and imported by 3 packages
Involved Source Files
swapper.go
d-> type.go
value.go
asm.s
Exported Type Names
type Kind uint
A Kind represents the specific kind of type that a Type represents.
The zero Kind is not a valid kind.
func Type.Kind() Kind
func Value.Kind() Kind
const Array
const Bool
const Chan
const Complex128
const Complex64
const Float32
const Float64
const Func
const Int
const Int16
const Int32
const Int64
const Int8
const Interface
const Invalid
const Map
const Ptr
const Slice
const String
const Struct
const Uint
const Uint16
const Uint32
const Uint64
const Uint8
const Uintptr
const UnsafePointer
type Type (interface)
Type is the representation of a Go type.
Not all methods apply to all kinds of types. Restrictions,
if any, are noted in the documentation for each method.
Use the Kind method to find out the kind of type before
calling kind-specific methods. Calling a method
inappropriate to the kind of type causes a run-time panic.
Type values are comparable, such as with the == operator,
so they can be used as map keys.
Two Type values are equal if they represent identical types.
(T) AssignableTo(u Type) bool
(T) Comparable() bool
(T) Elem() Type
(T) Implements(u Type) bool
(T) Kind() Kind
(T) Name() string
(T) PkgPath() string
(T) Size() uintptr
(T) String() string
T : fmt.Stringer
func TypeOf(i interface{}) Type
func Type.Elem() Type
func Value.Type() Type
func Type.AssignableTo(u Type) bool
func Type.Implements(u Type) bool
type Value (struct)
Value is the reflection interface to a Go value.
Not all methods apply to all kinds of values. Restrictions,
if any, are noted in the documentation for each method.
Use the Kind method to find out the kind of value before
calling kind-specific methods. Calling a method
inappropriate to the kind of type causes a run time panic.
The zero Value represents no value.
Its IsValid method returns false, its Kind method returns Invalid,
its String method returns "<invalid Value>", and all other methods panic.
Most functions and methods never return an invalid value.
If one does, its documentation states the conditions explicitly.
A Value can be used concurrently by multiple goroutines provided that
the underlying Go value can be used concurrently for the equivalent
direct operations.
To compare two Values, compare the results of the Interface method.
Using == on two Values does not compare the underlying values
they represent.
(T) CanSet() bool
(T) Elem() Value
(T) IsNil() bool
(T) IsValid() bool
(T) Kind() Kind
(T) Len() int
(T) Set(x Value)
(T) Type() Type
T : database/sql/driver.Validator
func ValueOf(i interface{}) Value
func Value.Elem() Value
func Value.Set(x Value)
type ValueError (struct)
A ValueError occurs when a Value method is invoked on
a Value that does not support it. Such cases are documented
in the description of each method.
Kind Kind
Method string
(*T) Error() string
*T : error
Exported Values
const Complex128 Kind = 16
func Swapper(slice interface{}) func(i, j int)
Swapper returns a function that swaps the elements in the provided
slice.
Swapper panics if the provided interface is not a slice.
func TypeOf(i interface{}) Type
TypeOf returns the reflection Type that represents the dynamic type of i.
If i is a nil interface value, TypeOf returns nil.
const UnsafePointer Kind = 26
![]() |
The pages are generated with Golds v0.1.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project and developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |