gf: github.com/johng-cn/gf/g/container/gtype Index | Files

package gtype

import "github.com/johng-cn/gf/g/container/gtype"

Package gtype provides kinds of high performance, concurrent-safe basic variable types.

并发安全基本类型.

Index

Package Files

bool.go byte.go bytes.go float32.go float64.go gtype.go int.go int32.go int64.go interface.go string.go uint.go uint32.go uint64.go

type Bool Uses

type Bool struct {
    // contains filtered or unexported fields
}

func NewBool Uses

func NewBool(value ...bool) *Bool

func (*Bool) Clone Uses

func (t *Bool) Clone() *Bool

func (*Bool) Set Uses

func (t *Bool) Set(value bool) (old bool)

并发安全设置变量值,返回之前的旧值

func (*Bool) Val Uses

func (t *Bool) Val() bool

type Byte Uses

type Byte struct {
    // contains filtered or unexported fields
}

func NewByte Uses

func NewByte(value ...byte) *Byte

func (*Byte) Add Uses

func (t *Byte) Add(delta int) byte

func (*Byte) Clone Uses

func (t *Byte) Clone() *Byte

func (*Byte) Set Uses

func (t *Byte) Set(value byte) (old byte)

并发安全设置变量值,返回之前的旧值

func (*Byte) Val Uses

func (t *Byte) Val() byte

type Bytes Uses

type Bytes struct {
    // contains filtered or unexported fields
}

func NewBytes Uses

func NewBytes(value ...[]byte) *Bytes

func (*Bytes) Clone Uses

func (t *Bytes) Clone() *Bytes

func (*Bytes) Set Uses

func (t *Bytes) Set(value []byte) (old []byte)

func (*Bytes) Val Uses

func (t *Bytes) Val() []byte

type Float32 Uses

type Float32 struct {
    // contains filtered or unexported fields
}

func NewFloat32 Uses

func NewFloat32(value ...float32) *Float32

func (*Float32) Add Uses

func (t *Float32) Add(delta float32) float32

func (*Float32) Clone Uses

func (t *Float32) Clone() *Float32

func (*Float32) Set Uses

func (t *Float32) Set(value float32) (old float32)

func (*Float32) Val Uses

func (t *Float32) Val() float32

type Float64 Uses

type Float64 struct {
    // contains filtered or unexported fields
}

func NewFloat64 Uses

func NewFloat64(value ...float64) *Float64

func (*Float64) Add Uses

func (t *Float64) Add(delta float64) float64

func (*Float64) Clone Uses

func (t *Float64) Clone() *Float64

func (*Float64) Set Uses

func (t *Float64) Set(value float64) (old float64)

func (*Float64) Val Uses

func (t *Float64) Val() float64

type Int Uses

type Int struct {
    // contains filtered or unexported fields
}

func NewInt Uses

func NewInt(value ...int) *Int

func (*Int) Add Uses

func (t *Int) Add(delta int) int

数值增加delta,并返回**新**的数值

func (*Int) Clone Uses

func (t *Int) Clone() *Int

func (*Int) Set Uses

func (t *Int) Set(value int) (old int)

并发安全设置变量值,返回之前的旧值

func (*Int) Val Uses

func (t *Int) Val() int

type Int32 Uses

type Int32 struct {
    // contains filtered or unexported fields
}

func NewInt32 Uses

func NewInt32(value ...int32) *Int32

func (*Int32) Add Uses

func (t *Int32) Add(delta int32) int32

func (*Int32) Clone Uses

func (t *Int32) Clone() *Int32

func (*Int32) Set Uses

func (t *Int32) Set(value int32) (old int32)

func (*Int32) Val Uses

func (t *Int32) Val() int32

type Int64 Uses

type Int64 struct {
    // contains filtered or unexported fields
}

func NewInt64 Uses

func NewInt64(value ...int64) *Int64

func (*Int64) Add Uses

func (t *Int64) Add(delta int64) int64

func (*Int64) Clone Uses

func (t *Int64) Clone() *Int64

func (*Int64) Set Uses

func (t *Int64) Set(value int64) (old int64)

func (*Int64) Val Uses

func (t *Int64) Val() int64

type Interface Uses

type Interface struct {
    // contains filtered or unexported fields
}

比较通用的并发安全数据类型

func NewInterface Uses

func NewInterface(value ...interface{}) *Interface

func (*Interface) Clone Uses

func (t *Interface) Clone() *Interface

func (*Interface) Set Uses

func (t *Interface) Set(value interface{}) (old interface{})

func (*Interface) Val Uses

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

type String Uses

type String struct {
    // contains filtered or unexported fields
}

func NewString Uses

func NewString(value ...string) *String

func (*String) Clone Uses

func (t *String) Clone() *String

func (*String) Set Uses

func (t *String) Set(value string) (old string)

func (*String) Val Uses

func (t *String) Val() string

type Type Uses

type Type = Interface

func New Uses

func New(value ...interface{}) *Type

type Uint Uses

type Uint struct {
    // contains filtered or unexported fields
}

func NewUint Uses

func NewUint(value ...uint) *Uint

func (*Uint) Add Uses

func (t *Uint) Add(delta uint) int

func (*Uint) Clone Uses

func (t *Uint) Clone() *Uint

func (*Uint) Set Uses

func (t *Uint) Set(value uint) (old uint)

func (*Uint) Val Uses

func (t *Uint) Val() uint

type Uint32 Uses

type Uint32 struct {
    // contains filtered or unexported fields
}

func NewUint32 Uses

func NewUint32(value ...uint32) *Uint32

func (*Uint32) Add Uses

func (t *Uint32) Add(delta uint32) uint32

func (*Uint32) Clone Uses

func (t *Uint32) Clone() *Uint32

func (*Uint32) Set Uses

func (t *Uint32) Set(value uint32) (old uint32)

func (*Uint32) Val Uses

func (t *Uint32) Val() uint32

type Uint64 Uses

type Uint64 struct {
    // contains filtered or unexported fields
}

func NewUint64 Uses

func NewUint64(value ...uint64) *Uint64

func (*Uint64) Add Uses

func (t *Uint64) Add(delta uint64) uint64

func (*Uint64) Clone Uses

func (t *Uint64) Clone() *Uint64

func (*Uint64) Set Uses

func (t *Uint64) Set(value uint64) (old uint64)

func (*Uint64) Val Uses

func (t *Uint64) Val() uint64

Package gtype imports 2 packages (graph). Updated 2019-01-16. Refresh now. Tools for package owners.