types

package
v0.0.0-...-ba7a004 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_DISABLE, DISABLE uint8 = iota, iota
	STATUS_ENABLE, ENABLE
)

类型: 启用状态

View Source
const (
	SWITCH_OFF, OFF uint8 = iota, iota
	SWITCH_ON, ON
)

类型: 状态开关

View Source
const (
	SUNDAY, SUM uint8 = iota, iota
	MONDAY, MON
	TUESDAY, TUE
	SEDNESDAY, SED
	THURSDAY, THU
	FRIDAY, FRI
	SATUREDAY, SAT
)

类型: 星期

View Source
const (
	JANUARY uint8 = iota + 1
	FEBRUARY
	MARCH
	APRIL
	MAY
	JUNE
	JULY
	AUGUST
	SEPTEMBER
	OCTOBER
	NOVEMBER
	DECEMBER
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gender

type Gender uint8

类型: 性别

const (
	GENDER_FEMALE  Gender = iota + 1 // 男
	GENDER_MALE                      // 女
	GENDER_UNKNOWN                   // 未知
)

type List

type List[T any] []T

泛型切片

func (*List[T]) Len

func (l *List[T]) Len() int

列表长度

func (*List[T]) Pop

func (l *List[T]) Pop() (el T)

列表末尾弹出一个元素

func (*List[T]) Print

func (l *List[T]) Print()

打印列表信息

func (*List[T]) Push

func (l *List[T]) Push(els ...T) *List[T]

列表末尾压入元素

func (*List[T]) Shift

func (l *List[T]) Shift() (el T)

列表弹出一个元素

func (*List[T]) Unshift

func (l *List[T]) Unshift(els ...T) *List[T]

列表头部插入元素

type MapT

type MapT[KT comparable, VT any] map[KT]VT

泛型集合

func (MapT[KT, KV]) BelongTo

func (mp MapT[KT, KV]) BelongTo(bm MapT[KT, KV]) bool

判断 mp 的元素是否都在 bm 中

func (MapT[KT, KV]) Contains

func (mp MapT[KT, KV]) Contains(sm MapT[KT, KV]) bool

判断 mp 是否包含 sm 的所有元数

type MemSize

type MemSize uint64

类型: 内存容量

const (
	MEM_SIZE_BYTE, BYTE MemSize = 1 << (iota * 10), 1 << (iota * 10)
	MEM_SIZE_KB, KB
	MEM_SIZE_MB, MB
	MEM_SIZE_GB, GB
	MEM_SIZE_TB, TB
	MEM_SIZE_PB, PB
)

Jump to

Keyboard shortcuts

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