Installation
Requirements
Section titled “Requirements”- Go 1.26 or later
- An active Go module (
go.mod)
Install
Section titled “Install”Run this in your project directory:
go get github.com/larsartmann/go-branded-idQuick Usage
Section titled “Quick Usage”package main
import ( "fmt"
"github.com/larsartmann/go-branded-id")
type UserBrand struct{}
type UserID = id.ID[UserBrand, string]
func main() { userID := id.NewID[UserBrand]("user-123") fmt.Println(userID.Get()) // user-123}Verify Installation
Section titled “Verify Installation”go list -m github.com/larsartmann/go-branded-idNext Steps
Section titled “Next Steps”- Follow the Quick Start for complete examples
- Learn about Named Brands for debug-visible IDs
- See Serialization for JSON, SQL, and more