Skip to main content
07.03.2026

Go Gets Native UUID Support

head-image

If you write Go services, you almost certainly have github.com/google/uuid in your dependencies. A quick GitHub code search confirms this package appears in virtually every server or database-backed Go program. The Go team accepted the proposal to add UUID support directly to the standard library, eliminating this near-universal external dependency.

Why This Matters for DevOps

For SRE and platform teams managing Go services, fewer dependencies mean:

  • Reduced supply chain risk: One less external package to audit, monitor, and trust
  • Simpler dependency management: No version conflicts or transitive dependency issues
  • Faster builds: Standard library packages are pre-compiled
  • Better security posture: Standard library code undergoes rigorous review

What the New Package Offers

The crypto/uuid package will support UUID versions 3, 4, and 5 per RFC 4122:

  • Version 4: Random UUIDs for general identifiers (most common use case)
  • Version 3: MD5 hash-based UUIDs from namespace and name
  • Version 5: SHA-1 hash-based UUIDs from namespace and name

The API mirrors the battle-tested github.com/google/uuid interface, making migration straightforward:

import "crypto/uuid"

// Generate a random UUID (v4)
id := uuid.New()

// Parse an existing UUID string
parsed, err := uuid.Parse("550e8400-e29b-41d4-a716-446655440000")

Migration Path

When the package ships, updating your services should be mechanical:

  1. Replace github.com/google/uuid imports with crypto/uuid
  2. Run tests to catch any API differences
  3. Remove the external dependency from go.mod

For large codebases, tools like gopls and gofmt can automate the import rewrite.

Timeline

The proposal was accepted and implementation is underway. While Go does not pre-announce release dates, UUID support could land in Go 1.24 or a subsequent release. Track progress in the GitHub issue.

Conclusion

Native UUID support brings Go in line with Python, Java, JavaScript, Ruby, and C#, all of which include UUID generation in their standard libraries. For DevOps teams, this means one less external dependency to manage across your Go microservices.

Looking for a platform to manage your AI-powered SRE workflows? Check out Akmatori for intelligent incident response and infrastructure automation, powered by Gcore edge infrastructure.

Automate incident response and prevent on-call burnout with AI-driven agents!