strs

package
v0.0.0-...-4ea7438 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCode

func GenCode(width int) string

GenCode 获取随机码

func Left

func Left(str string, length int, pad string) string

Left left-pads the string with pad up to len runes len may be exceeded if

func LeftUtf8

func LeftUtf8(str string, len int, pad string) string

LeftUtf8 left-pads the string with pad up to len runes len may be exceeded if

func MustString

func MustString() string

MustString Create uuid

func Right(str string, length int, pad string) string

Right right-pads the string with pad up to len runes

func RightUtf8

func RightUtf8(str string, len int, pad string) string

RightUtf8 right-pads the string with pad up to len runes

func TraceID

func TraceID() string

TraceID TraceID

Types

type UUID

type UUID = uuid.UUID

UUID Define alias

func MustUUID

func MustUUID() UUID

MustUUID Create uuid(Throw panic if something goes wrong)

func NewUUID

func NewUUID() (UUID, error)

NewUUID Create uuid

Jump to

Keyboard shortcuts

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