util

package
v0.0.0-...-d42ca00 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Alphabet62 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
	Alphabet36 = "abcdefghijklmnopqrstuvwxyz1234567890"
)

Variables

This section is empty.

Functions

func DefaultIfEmpty

func DefaultIfEmpty[T any](obj T, defaultObj T) T

func DefaultIfNil

func DefaultIfNil[T any](obj T, defaultObj T) T

func GetInstanceID

func GetInstanceID(uid uint64, prefix string) string

GetInstanceID returns id format like: secret-2v69o5

func GetIntID

func GetIntID() uint64

GetIntID returns uint64 uniq id.

func GetUUID36

func GetUUID36(prefix string) string

GetUUID36 returns id format like: 300m50zn91nwz5.

func IsEmpty

func IsEmpty[T any](obj T) bool

func IsNil

func IsNil[T any](obj T) bool

func NewSecretID

func NewSecretID() string

NewSecretID returns a secretID.

func NewSecretKey

func NewSecretKey() string

NewSecretKey returns a secretKey or password.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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