gvar

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 New

func New(value interface{}, safe ...bool) *Var

New 函数保持不变

func (*Var) Bool

func (v *Var) Bool() bool

Bool 将 Var 转换为 bool

func (*Var) Bytes

func (v *Var) Bytes() []byte

Bytes 将 Var 转换为 []byte

func (*Var) Clone

func (v *Var) Clone() *Var

Clone 创建当前 Var 的浅拷贝

func (*Var) DeepCopy

func (v *Var) DeepCopy() interface{}

DeepCopy 实现当前类型深拷贝的接口

func (*Var) Duration

func (v *Var) Duration() time.Duration

Duration 将 Var 转换为 time.Duration

func (*Var) Float32

func (v *Var) Float32() float32

Float32 将 Var 转换为 float32

func (*Var) Float64

func (v *Var) Float64() float64

Float64 将 Var 转换为 float64

func (*Var) Int

func (v *Var) Int() int

Int 方法保持不变

func (*Var) Int8

func (v *Var) Int8() int8

Int8 将 Var 转换为 int8

func (*Var) Int16

func (v *Var) Int16() int16

Int16 将 Var 转换为 int16

func (*Var) Int32

func (v *Var) Int32() int32

Int32 将 Var 转换为 int32

func (*Var) Int64

func (v *Var) Int64() int64

Int64 将 Var 转换为 int64

func (*Var) Interface

func (v *Var) Interface() interface{}

Interface Val 的别名

func (*Var) IsEmpty

func (v *Var) IsEmpty() bool

IsEmpty checks whether `v` is empty.

func (*Var) IsFloat

func (v *Var) IsFloat() bool

IsFloat checks whether `v` is type of float.

func (*Var) IsInt

func (v *Var) IsInt() bool

IsInt checks whether `v` is type of int.

func (*Var) IsMap

func (v *Var) IsMap() bool

IsMap checks whether `v` is type of map.

func (*Var) IsNil

func (v *Var) IsNil() bool

IsNil checks whether `v` is nil.

func (*Var) IsSlice

func (v *Var) IsSlice() bool

IsSlice checks whether `v` is type of slice.

func (*Var) IsStruct

func (v *Var) IsStruct() bool

IsStruct checks whether `v` is type of struct.

func (*Var) IsUint

func (v *Var) IsUint() bool

IsUint checks whether `v` is type of uint.

func (*Var) MarshalJSON

func (v *Var) MarshalJSON() ([]byte, error)

MarshalJSON 实现 json.Marshal 的 MarshalJSON 接口

func (*Var) Release

func (v *Var) Release()

Release 释放 Var 对象回到对象池

func (*Var) Set

func (v *Var) Set(value interface{}) (old interface{})

Set 方法需要修复以正确处理 interface{} 类型

func (*Var) String

func (v *Var) String() string

String 将 Var 转换为字符串

func (*Var) Time

func (v *Var) Time(format ...string) time.Time

Time 将 Var 转换为 time.Time

func (*Var) Uint

func (v *Var) Uint() uint

Uint 将 Var 转换为 uint

func (*Var) Uint8

func (v *Var) Uint8() uint8

Uint8 将 Var 转换为 uint8

func (*Var) Uint16

func (v *Var) Uint16() uint16

Uint16 将 Var 转换为 uint16

func (*Var) Uint32

func (v *Var) Uint32() uint32

Uint32 将 Var 转换为 uint32

func (*Var) Uint64

func (v *Var) Uint64() uint64

Uint64 将 Var 转换为 uint64

func (*Var) UnmarshalJSON

func (v *Var) UnmarshalJSON(b []byte) error

UnmarshalJSON 实现 json.Unmarshal 的 UnmarshalJSON 接口

func (*Var) UnmarshalValue

func (v *Var) UnmarshalValue(value interface{}) error

UnmarshalValue 实现接口,为 Var 设置任意类型的值

func (*Var) Val

func (v *Var) Val() interface{}

Val 方法需要修改以确保并发安全

Jump to

Keyboard shortcuts

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