reflect2

package
v0.0.0-...-1942688 Latest Latest
Warning

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

Go to latest
Published: May 14, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNonPrimitive = errors.Err("not primitive type")
)

Variables

This section is empty.

Functions

func IndirectType

func IndirectType(v interface{}) reflect.Type

IndirectType return real type of value without pointer

func IsSlice

func IsSlice(s interface{}) bool

IsSlice check whether or not param is slice

func MarshalPrimitive

func MarshalPrimitive(v reflect.Value) string

func MarshalStruct

func MarshalStruct(v interface{}, values map[string]string, tag string)

func UnmarshalPrimitive

func UnmarshalPrimitive(str string, v reflect.Value) error

UnmarshalPrimitive unmarshal bytes to primitive

func UnmarshalStruct

func UnmarshalStruct(v interface{}, values map[string]string, tag string)

Types

type Equaler

type Equaler interface {
	EqualTo(interface{}) bool
}

Equaler is a interface that compare whether two object is equal

Jump to

Keyboard shortcuts

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