Categorygithub.com/webmafia/identifier
modulepackage
0.3.0
Repository: https://github.com/webmafia/identifier.git
Documentation: pkg.go.dev

# README

identifier

Very fast generator of unique IDs.

  • 8 bytes decoded integer
    • int64 (only 63 bits used)
    • contains a unix timestamp with millisecond precision
    • sequential
    • sortable by time
    • used in databases
  • 13 bytes encoded string
    • appears random
    • used in JSON

Install

go get github.com/webmafia/identifier

Usage

id := identifier.Generate()

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
Generates a unique ID.

# Variables

No description provided by the author

# Interfaces

BinaryAppender is the interface implemented by an object that can append the binary representation of itself.
TextAppender is the interface implemented by an object that can append the textual representation of itself.

# Type aliases

No description provided by the author