builtin

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b any) any

a+b

func And

func And(arg0 any, args ...any) bool

&&

func Append

func Append(a any, vals ...any) any

Append([]T, value...)

func BitAnd

func BitAnd(a, b any) int

a & b

func BitAndNot

func BitAndNot(a, b any) int

a &^ b

func BitLshr

func BitLshr(a, b any) int

a << b

func BitNot

func BitNot(a any) int

^a

func BitOr

func BitOr(a, b any) int

a | b

func BitRshr

func BitRshr(a, b any) int

a >> b

func BitXor

func BitXor(a, b any) int

a ^ b

func Bool

func Bool(a any) bool

Bool returns bool(a)

func Byte

func Byte(a any) byte

Byte returns byte(a)

func Bytes added in v2.4.1

func Bytes(inf any) []byte

func Cap

func Cap(a any) int

Cap([]T)

func ChanOf

func ChanOf(typ any) reflect.Type

ChanOf(T)

func Close

func Close(a any)

Close(*Chan)

func Complex128

func Complex128(a any) complex128

Complex128 returns complex128(a)

func Complex64

func Complex64(a any) complex64

Complex64 returns complex64(a)

func Compute

func Compute(x any, symbol string, y any) (i any, err error)

Compute(1, "+", 2)

func Convert added in v2.4.11

func Convert(a, b any) bool

该函数暂时测试,可能会改动。

a,b any		b转换到a类型

func Copy

func Copy(a, b any) int

Copy([]T, []T)

func Dec

func Dec(a any) any

a-1

func Delete

func Delete(m any, key any)

Delete(map[T]T, "key")

func EQ

func EQ(a, b any) bool

a == b

func Float32

func Float32(a any) float32

Float32 returns float32(a)

func Float64

func Float64(a any) float64

Float64 returns float64(a)

func GE

func GE(a, b any) bool

a >= b

func GT

func GT(a, b any) bool

a > b

func Get

func Get(m any, key any) any

Get(map[T]T, key) Get([]T, index) Get(struct{}, key) Get(string, index) Get(number, index)

func GetSlice

func GetSlice(a, i, j any) any

GetSlice([]T, 1, 5)

func GetSlice3

func GetSlice3(a, i, j, c any) any

GetSlice3([]T, 1, 5, 6)

func Inc

func Inc(a any) any

a+1

func Init added in v2.4.11

func Init(v any)

初始化一个类型

v any		未初始化的类型

func Int

func Int(a any) int

Int returns int(a)

func Int16

func Int16(a any) int16

Int16 returns int16(a)

func Int32

func Int32(a any) int32

Int32 returns int32(a)

func Int64

func Int64(a any) int64

Int64 returns int64(a)

func Int8

func Int8(a any) int8

Int8 returns int8(a)

func LE

func LE(a, b any) bool

a <= b

func LT

func LT(a, b any) bool

a < b

func Len

func Len(a any) int

Len([]T) Len(string) Len(map[T]T)

func Make

func Make(typ any, args ...any) any

Make([]T, length, cap) Make([T]T, length) Make(Chan, length) Make(func, func([]reflect.Value)[]reflect.Value)

func MapFrom

func MapFrom(m any, args ...any) any

MapFrom(M, T1, V1, T2, V2, ...)

func Max

func Max(args ...any) (max any)

Max(a1, a2, ...)

func Min

func Min(args ...any) (min any)

Min(a1, a2, ...)

func Mod

func Mod(a, b any) any

a%b

func Mul

func Mul(a, b any) any

a*b

func NE

func NE(a, b any) bool

a != b

func Neg

func Neg(a any) any

-a

func Not

func Not(a any) bool

!1

func Or

func Or(arg0 any, args ...any) bool

||

func Panic

func Panic(v any)

Panic(v)

func Pointer

func Pointer(a any) unsafe.Pointer

Uintptr returns uintptr(a)

func Quo

func Quo(a, b any) any

a/b

func Recv

func Recv(a any) any

Recv(*Chan)

func Rune

func Rune(a any) rune

rune returns rune(a)

func Runes added in v2.7.1

func Runes(inf any) []rune

func Send

func Send(a any, v any)

Send(*Chan, value)

func Set

func Set(m any, args ...any)

Set([]T, 位置0,值1, 位置1,值2, 位置2,值3) Set(map[T]T, 键名0,值1, 键名1,值2, 键名2,值3) Set(struct{}, 名称0,值1, 名称1,值2, 名称2,值3)

func SliceFrom

func SliceFrom(t any, args ...any) any

SliceFrom(T, 值0, 值1,...)

func String

func String(a any) string

String returns string(a)

func Sub

func Sub(a, b any) any

a-b

func TryRecv

func TryRecv(a any) any

不阻塞 TryRecv(*Chan)

func TrySend

func TrySend(a any, v any) bool

不阻塞 TrySend(*Chan, value)

func Type

func Type(v any) reflect.Type

Type(v)

func Uint

func Uint(a any) uint

Uint returns uint(a)

func Uint16

func Uint16(a any) uint16

Uint16 returns uint16(a)

func Uint32

func Uint32(a any) uint32

Uint32 returns uint32(a)

func Uint64

func Uint64(a any) uint64

Uint64 returns uint64(a)

func Uint8

func Uint8(a any) uint8

Uint8 returns uint8(a)

func Uintptr

func Uintptr(a any) uintptr

Uintptr returns uintptr(a)

func Value

func Value(v any) reflect.Value

Value(v)

Types

type Chan

type Chan struct {
	Data reflect.Value
}

func MakeChan

func MakeChan(typ any, buffer ...any) *Chan

MakeChan(T, size)

Jump to

Keyboard shortcuts

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