unique

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

package unique 对象唯一ID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUniqueKey

func GenUniqueKey(prefix string) string

Types

type MultiGenerator

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

统一管理各个需要生成unique id的generator对象

func (*MultiGenerator) GenUniqueKey

func (mi *MultiGenerator) GenUniqueKey(prefix string) string

type SingleGenerator

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

只管理一个需要生成unique id的generator对象

func NewSingleGenerator

func NewSingleGenerator(prefix string) *SingleGenerator

func (*SingleGenerator) GenUniqueKey

func (si *SingleGenerator) GenUniqueKey() string

Jump to

Keyboard shortcuts

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