package
Version:
v0.0.0-...-2680af6
Opens a new window with list of versions in this module.
Published: Aug 9, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Introduction
A wrapper for the package https://github.com/bwmarrin/snowflake
Usage
Just import the package into the file to use it.
Example Program:
package foo
import (
"fmt"
"go.tekoapis.com/tekone/library/util/snowflake"
)
func doSomething() {
// generate snowflake ID
id, err := snowflake.NextID()
if err != nil {
// handle err
}
// use generated id to do something
....
}
Documentation
¶
NextID generates an unique int64 of the snowflake ID
Ex: 587159296175034368
Source Files
¶
Click to show internal directories.
Click to hide internal directories.