Documentation
¶
Index ¶
- type Var
- func (v *Var) Bool() bool
- func (v *Var) Bytes() []byte
- func (v *Var) Clone() *Var
- func (v *Var) Float32() float32
- func (v *Var) Float64() float64
- func (v *Var) Int() int
- func (v *Var) Int16() int16
- func (v *Var) Int32() int32
- func (v *Var) Int64() int64
- func (v *Var) Int8() int8
- func (v *Var) Interface() interface{}
- func (v *Var) MarshalJSON() ([]byte, error)
- func (v *Var) Set(value interface{}) (old interface{})
- func (v *Var) String() string
- func (v *Var) Uint() uint
- func (v *Var) Uint16() uint16
- func (v *Var) Uint32() uint32
- func (v *Var) Uint64() uint64
- func (v *Var) Uint8() uint8
- func (v *Var) UnmarshalJSON(b []byte) error
- func (v *Var) UnmarshalValue(value interface{}) error
- func (v *Var) Val() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Var ¶
type Var struct {
// contains filtered or unexported fields
}
Var is an universal variable type implementer.
func Create ¶
Create creates and returns a new Var with given `value`. The optional parameter `safe` specifies whether Var is used in concurrent-safety, which is false in default.
func New ¶
New creates and returns a new Var with given `value`. The optional parameter `safe` specifies whether Var is used in concurrent-safety, which is false in default.
func (*Var) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Var) Set ¶
func (v *Var) Set(value interface{}) (old interface{})
Set sets `value` to `v`, and returns the old value.
func (*Var) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Var) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for Var.