util

package
v0.0.0-...-b1e1012 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bin = iota
	Hex
	Dec
)

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte, enc Enc) string

func PadWithString

func PadWithString(msg, pad string, width int) string

func ParseUlidString

func ParseUlidString(id string) (ulid.ULID, bool, string)

func UlidTimes

func UlidTimes(id ulid.ULID) (string, string, uint64)

Types

type Enc

type Enc int

type Field

type Field int
const (
	T1 Field = iota
	T2
	E1
	E2
	E3
)

type ULID

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

func NewULID

func NewULID(id ulid.ULID) ULID

func (ULID) ToString

func (u ULID) ToString(f Field, e Enc) string

Jump to

Keyboard shortcuts

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