encoding

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Base32Encoder = base32.NewEncoding(specialEncoderKey).WithPadding(base32.NoPadding)

Functions

func FixedLengthUniqueID

func FixedLengthUniqueID(inputID string, maxLength int) (string, error)

Creates a new UniqueID that is based on the inputID and of a specified length, if the given id is longer than the maxLength.

func FixedLengthUniqueIDForParts

func FixedLengthUniqueIDForParts(maxLength int, parts ...string) (string, error)

Creates a new uniqueID using the parts concatenated using `-` and ensures that the uniqueID is not longer than the maxLength. In case a simple concatenation yields a longer string, a new hashed ID is created which is always around 8 characters in length

Types

This section is empty.

Jump to

Keyboard shortcuts

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