Discover Packages
github.com/inklabs/rangedb
pkg
shortuuid
package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Dec 24, 2020
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
Documentation
¶
SetRand sets the random number generator to seed.
ShortUUID is a type that can stringify a UUID without hyphens.
New constructs a ShortUUID object.
package main
import (
"fmt"
"github.com/inklabs/rangedb/pkg/shortuuid"
)
func main() {
// Given
shortuuid.SetRand(101)
u := shortuuid.New()
// When
fmt.Println(u.String())
}
Output:
b03b2442c5de4e58b6c62e8094847f3d
Source Files
¶
Click to show internal directories.
Click to hide internal directories.