unique

package
v0.0.0-...-680e691 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key interface {
	ID() int
	Name() string
	Group() string
	String() string
}

Key 唯一key,将string映射到唯一索引 相同group下,id从零自增,可以作为数组下标所为索引,不同机器下不能保证id相同,故不能用id序列化 通常为全局静态变量

func NewKey

func NewKey(group, name string) Key

NewKey 通过group,name创建key

Jump to

Keyboard shortcuts

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