Documentation ¶
Overview ¶
Package gvar provides an universal variable type, like generics.
通用动态变量.
Index ¶
- type Var
- func (v *Var) Bool() bool
- func (v *Var) Bytes() []byte
- func (v *Var) Float32() float32
- func (v *Var) Float64() float64
- func (v *Var) Floats() []float64
- func (v *Var) GTime(format ...string) *gtime.Time
- 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) Interfaces() []interface{}
- func (v *Var) Ints() []int
- func (v *Var) IsNil() bool
- func (v *Var) ReadOnly() VarRead
- func (v *Var) Set(value interface{}) (old interface{})
- func (v *Var) String() string
- func (v *Var) Strings() []string
- func (v *Var) Struct(objPointer interface{}, attrMapping ...map[string]string) error
- func (v *Var) Time(format ...string) time.Time
- func (v *Var) TimeDuration() time.Duration
- 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) Val() interface{}
- type VarRead
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
}
func (*Var) Interfaces ¶
func (v *Var) Interfaces() []interface{}
func (*Var) TimeDuration ¶
type VarRead ¶ added in v1.2.11
type VarRead interface { Val() interface{} IsNil() bool Bytes() []byte String() string Bool() bool Int() int Int8() int8 Int16() int16 Int32() int32 Int64() int64 Uint() uint Uint8() uint8 Uint16() uint16 Uint32() uint32 Uint64() uint64 Float32() float32 Float64() float64 Interface() interface{} Ints() []int Floats() []float64 Strings() []string Interfaces() []interface{} Time(format ...string) time.Time TimeDuration() time.Duration GTime(format ...string) *gtime.Time Struct(objPointer interface{}, attrMapping ...map[string]string) error }
只读变量接口
Click to show internal directories.
Click to hide internal directories.