b58id

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 2 Imported by: 0

README

Base58 ID

Create random base58 ID's based on UUID's.

Motivation

I wanted the simplest possible way of generating unique base58 ID's.

Usage

id := b58iud.New() // e.g. "A3hYyNE2ZXNFJZbTenaB36"

License

The MIT License (MIT)

Copyright (c) 2024 Scott Barr

See LICENSE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build() (string, error)

Build returns an ID, and any error that could have occurred when generating a new UUID.

func FromString

func FromString(id string) (string, error)

FromString returns a base58 encoded ID from a string. The input string must be parsable as a UUID.

func FromUUID

func FromUUID(u uuid.UUID) (string, error)

FromUUID returns a base58 encoded ID from a UUID.

func New

func New() string

New returns a new ID.

Will panic if UUID generation fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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