Documentation ¶
Index ¶
- func Atof(a string) float64
- func Atoi(a string) int64
- func Atot(a string) bool
- func Atou(a string) uint64
- func Atov(a string) interface{}
- func Ftoa(f float64) string
- func Ftoi(f float64) int64
- func Ftot(f float64) bool
- func Ftou(f float64) uint64
- func Ftov(f float64) interface{}
- func Itoa(i int64) string
- func Itof(i int64) float64
- func Itot(i int64) bool
- func Itou(i int64) uint64
- func Itov(i int64) interface{}
- func Ttoa(t bool) string
- func Ttof(t bool) float64
- func Ttoi(t bool) int64
- func Ttou(t bool) uint64
- func Ttov(t bool) interface{}
- func Utoa(u uint64) string
- func Utof(u uint64) float64
- func Utoi(u uint64) int64
- func Utot(u uint64) bool
- func Utov(u uint64) interface{}
- func Vtoa(v interface{}) string
- func Vtof(v interface{}) float64
- func Vtoi(v interface{}) int64
- func Vtot(v interface{}) bool
- func Vtou(v interface{}) uint64
- type Value
- func Any(v interface{}) Value
- func Bool(t bool) Value
- func Byte(x byte) Value
- func Bytes(b []byte) Value
- func CustomBits(x uint64) Value
- func Float32(x float32) Value
- func Float64(f float64) Value
- func Int(x int) Value
- func Int16(x int16) Value
- func Int32(x int32) Value
- func Int64(x int64) Value
- func Int8(x int8) Value
- func Nil() Value
- func String(s string) Value
- func StringWithTag(s string, tag uint16) Value
- func Uint(x uint) Value
- func Uint16(x uint16) Value
- func Uint32(x uint32) Value
- func Uint64(x uint64) Value
- func Uint8(x uint8) Value
- func (v Value) Any() interface{}
- func (v Value) Bool() bool
- func (v Value) Byte() byte
- func (v Value) Bytes() []byte
- func (v Value) Float32() float32
- func (v Value) Float64() float64
- func (v Value) Int() int
- func (v Value) Int16() int16
- func (v Value) Int32() int32
- func (v Value) Int64() int64
- func (v Value) Int8() int8
- func (v Value) IsBool() bool
- func (v Value) IsBytes() bool
- func (v Value) IsCustomBits() bool
- func (v Value) IsFloat() bool
- func (v Value) IsInt() bool
- func (v Value) IsNil() bool
- func (v Value) IsNumber() bool
- func (v Value) IsString() bool
- func (v Value) IsUint() bool
- func (v Value) String() string
- func (v Value) Tag() uint16
- func (v Value) Uint() uint
- func (v Value) Uint16() uint16
- func (v Value) Uint32() uint32
- func (v Value) Uint64() uint64
- func (v Value) Uint8() uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Atof ¶
Atof converts string to float64 For infinte numbers use 'Infinity' or '-Infinity', not 'Inf' or '-Inf'. Returns NaN for invalid syntax
Types ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is a boxed value
func StringWithTag ¶
StringWithTag boxes a string value and adds a custom tag.
func (Value) Any ¶
func (v Value) Any() interface{}
Any returns the value as an `any/interface{}` type.
func (Value) Bytes ¶
Bytes returns the value as a byte slice. When the boxed value is a `[]byte` then those original bytes are returned. Otherwise, the string representation of the value is returned, which will be equivalent to `[]byte(value.String())`.
func (Value) IsCustomBits ¶
IsCustomBits returns true if the boxed value was created using box.CustomBits.
func (Value) IsFloat ¶
IsFloat returns true if the boxed value is a float-like primitive: float32, float64
func (Value) IsInt ¶
IsInt returns true if the boxed value is an int-like primitive: int, int8, int16, int32, int64, byte
func (Value) IsNumber ¶
IsNumber returns true if the boxed value is an numeric-like primitive: int, int8, int16, int32, int64, byte, uint, uint8, uint16, uint32, uint64, float32, float64
func (Value) IsUint ¶
IsUint returns true if the boxed value is an uint-like primitive: uint, uint8, uint16, uint32, uint64