Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. uuid

uuid

BSD-3-ClauseGov1.6.0

Go package for generating and inspecting UUIDs compliant with RFC 9562 and DCE 1.1 standards.

GitHubGitHub
6.1k stars432 forks0 contributors

What is uuid?

Google's uuid is a Go package that provides a robust implementation for generating and inspecting Universally Unique Identifiers (UUIDs). It ensures compliance with RFC 9562 and DCE 1.1 standards, making it suitable for distributed systems requiring unique identifiers. The package uses a fixed 16-byte array for better type safety and clear handling of NIL UUIDs.

Target Audience

Go developers building distributed systems, microservices, or applications that require reliable, standards-compliant unique identifiers for entities like database records, session tokens, or message IDs.

Value Proposition

Developers choose this package for its strict adherence to the latest UUID standards (RFC 9562 and DCE 1.1) and its type-safe implementation using a 16-byte array, which prevents invalid UUID states while maintaining backward compatibility with earlier go-uuid packages.

Overview

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.

Use Cases

Best For

  • Generating RFC 9562-compliant UUIDs in Go applications for distributed systems.
  • Implementing DCE 1.1 authentication and security services that require standardized UUIDs.
  • Ensuring type safety in UUID handling by using fixed-size arrays instead of byte slices.
  • Distinguishing between valid UUIDs and NIL (zero-value) UUIDs in Go code.
  • Migrating from older go-uuid packages (e.g., github.com/pborman/uuid) with improved, backward-compatible implementations.
  • Creating unique identifiers for database records, session management, or message queues in Go microservices.

Not Ideal For

  • Projects requiring UUID generation in programming languages other than Go
  • Applications that need to explicitly represent or handle syntactically invalid UUID states
  • Small-scale Go scripts where minimizing third-party dependencies is a priority over type safety
  • Teams heavily invested in older Go UUID libraries with slice-based APIs who prefer to avoid migration refactoring

Pros & Cons

Pros

RFC 9562 Compliance

Generates UUIDs that adhere to the latest UUID specification standards, ensuring interoperability and reliability in distributed systems.

Type-Safe Implementation

Uses a fixed 16-byte array instead of byte slices, preventing invalid UUID states at compile time and reducing runtime errors.

Clear NIL UUID Handling

Provides a distinct uuid.Nil value for zero-value UUIDs, making it easy to check for uninitialized or placeholder identifiers.

Backward Compatibility

Evolved from earlier go-uuid packages like pborman/uuid with improvements, easing migration while maintaining core functionality.

Cons

Loss of Invalid Representation

The switch to a fixed array means it cannot model UUIDs that are syntactically invalid, which might be needed for certain validation or error-handling scenarios.

Go-Only Solution

Exclusively targets Go applications, making it unsuitable for polyglot projects that require consistent UUID generation across multiple programming languages.

Migration Overhead

Developers moving from slice-based UUID packages may face refactoring challenges due to the array-based API change, as noted in the README's comparison with predecessors.

Frequently Asked Questions

Quick Stats

Stars6,118
Forks432
Contributors0
Open Issues28
Last commit1 year ago
CreatedSince 2016

Tags

#authentication#rfc-9562#distributed-systems#unique-identifiers#uuid#uuid-generation#type-safe#go

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

ulidulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Go

Stars5,043
Forks188
Last commit1 day ago
xidxid

xid is a globally unique id generator thought for the web

Stars4,280
Forks213
Last commit4 months ago
uuiduuid

A UUID package for Go

Stars1,814
Forks124
Last commit1 month ago
wuidwuid

An extremely fast globally unique number generator.

Stars545
Forks48
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub