rid

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 4 Imported by: 2

README ¶

ose-rid

A UUID-length readable ID generator for your products and microservices.

Go Reference Go Report Card License

Features

  • Generates 36-character IDs.
  • Includes prefix, timestamp, and random uniqueness.
  • Thread-safe and easy to use.
  • MIT licensed for free commercial and private use.

Example Usage

package main

import (
	"fmt"
	"github.com/ose-micro/rid"
)

func main() {
	gen := rid.New("PRD", true)
	fmt.Println(gen.String())
	// Example output: PRD250827-1423-ABCD-EF01-1234567890AB
}

📦 Install

go get github.com/ose-micro/rid

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type Id ¶ added in v0.0.2

type Id struct {
	// contains filtered or unexported fields
}

func Existing ¶ added in v0.0.3

func Existing(id string) *Id

func New ¶

func New(prefix string, uppercase bool) *Id

func (Id) Equals ¶ added in v0.0.2

func (i Id) Equals(other Id) bool

func (Id) String ¶ added in v0.0.2

func (i Id) String() string

Jump to

Keyboard shortcuts

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