reflects

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 1 Imported by: 12

Documentation

Index

Constants

View Source
const (
	// Int for all intX types
	Int = BKind(reflect.Int)
	// Uint for all uintX types
	Uint  = BKind(reflect.Uint)
	Float = BKind(reflect.Float32)
	Array = BKind(reflect.Array)
	// Complex for all complexX types
	Complex = BKind(reflect.Complex64)
)

base kinds

Variables

This section is empty.

Functions

func Elem

func Elem(v reflect.Value) reflect.Value

Elem returns the value that the interface v contains or that the pointer v points to.

Types

type BKind

type BKind uint

BKind base data kind type

func ToBaseKind

func ToBaseKind(kind reflect.Kind) BKind

ToBaseKind convert reflect.Kind to base kind

type Type

type Type interface {
	reflect.Type
	// BaseKind value
	BaseKind() BKind
}

Type struct

func TypeOf

func TypeOf(v interface{}) Type

TypeOf value

type Value

type Value struct {
	reflect.Value
	// contains filtered or unexported fields
}

Value struct

func ValueOf

func ValueOf(v interface{}) Value

ValueOf the give value

func Wrap

func Wrap(rv reflect.Value) Value

Wrap the give value

func (Value) BaseKind

func (v Value) BaseKind() BKind

BaseKind value

func (Value) Elem

func (v Value) Elem() Value

Elem returns the value that the interface v contains or that the pointer v points to.

TIP: not like reflect.Value.Elem. otherwise, will return self.

func (Value) Indirect

func (v Value) Indirect() Value

Indirect value

func (Value) Type

func (v Value) Type() Type

Type of value.

Jump to

Keyboard shortcuts

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