types

package
v0.0.0-...-75d2a66 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeError = errors.New("type error")

Functions

func ByteToInt64

func ByteToInt64(b []byte) (int64, error)

func Int64ToByte

func Int64ToByte(i int64) ([]byte, error)

func ToFloat32

func ToFloat32(s string) (float32, error)

func ToFloat64

func ToFloat64(s string) (float64, error)

func ToInt32

func ToInt32(s string) (int32, error)

func ToInt64

func ToInt64(s string) (int64, error)

func ToString

func ToString(src interface{}) string

Types

type Type

type Type struct {
	reflect.Value
}

func Help

func Help(v interface{}) *Type

func (*Type) Bool

func (t *Type) Bool() (bool, error)

func (*Type) BoolOr

func (t *Type) BoolOr(value bool) bool

func (*Type) Float32

func (t *Type) Float32() (float32, error)

func (*Type) Float32Or

func (t *Type) Float32Or(value float32) float32

func (*Type) Float32Slice

func (t *Type) Float32Slice() []float32

func (*Type) Float64

func (t *Type) Float64() (float64, error)

func (*Type) Float64Or

func (t *Type) Float64Or(value float64) float64

func (*Type) Float64Slice

func (t *Type) Float64Slice() []float64

func (*Type) Int

func (t *Type) Int() (int, error)

func (*Type) Int32

func (t *Type) Int32() (int32, error)

func (*Type) Int32Or

func (t *Type) Int32Or(value int32) int32

func (*Type) Int32Slice

func (t *Type) Int32Slice() []int32

func (*Type) Int64

func (t *Type) Int64() (int64, error)

func (*Type) Int64Or

func (t *Type) Int64Or(value int64) int64

func (*Type) Int64Slice

func (t *Type) Int64Slice() []int64

func (*Type) IntOr

func (t *Type) IntOr(value int) int

func (*Type) IntSlice

func (t *Type) IntSlice() []int

func (*Type) Interface

func (t *Type) Interface() interface{}

func (*Type) IsEmpty

func (t *Type) IsEmpty() bool

func (*Type) IsZero

func (t *Type) IsZero() bool

func (*Type) Slice

func (t *Type) Slice(sliceKind reflect.Kind) interface{}

func (*Type) String

func (t *Type) String() (string, error)

func (*Type) StringOr

func (t *Type) StringOr(value string) string

func (*Type) UInt64Slice

func (t *Type) UInt64Slice() []uint64

func (*Type) UIntSlice

func (t *Type) UIntSlice() []uint

func (*Type) Uint64

func (t *Type) Uint64() (uint64, error)

func (*Type) Uint64Or

func (t *Type) Uint64Or(value uint64) uint64

Jump to

Keyboard shortcuts

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