Skip to content

Releases: pscheid92/uuid

v0.2.0

14 Mar 19:59

Choose a tag to compare

Removed

  • NewV3 and V3 version constant — V3 (MD5) is superseded by V5 (SHA-1) per RFC 9562

Changed

  • hash.Cloner optimization now only covers SHA-1 (V5), MD5 removed
  • .golangci.yml gosec exclusions narrowed to G505 only (SHA-1)

Full Changelog: v0.1.1...v0.2.0

v0.1.1

15 Feb 23:34

Choose a tag to compare

Fixed

  • Fix trailing space in generate.go to satisfy gofmt -s
  • Reduce ParseLenient cyclomatic complexity from 20 to ~9 by moving hyphen validation into parseHex

v0.1.0

15 Feb 23:29

Choose a tag to compare

Added

  • UUID type as [16]byte value type with Nil and Max constants
  • UUID generation: NewV3 (MD5), NewV4 (random), NewV5 (SHA-1), NewV7 (timestamp+random), NewV8 (custom)
  • Generator type with per-instance V7 monotonicity (RFC 9562 Method 3)
  • Predefined namespace UUIDs: NamespaceDNS, NamespaceURL, NamespaceOID, NamespaceX500
  • Parse (strict 36-char hyphenated) and ParseLenient (URN, braced, compact forms)
  • MustParse for package-level constants
  • FromBytes constructor from byte slices
  • String and URN formatting methods
  • Version, Variant, IsNil, Bytes, Time, Compare accessors
  • encoding.TextMarshaler / TextUnmarshaler for JSON support
  • encoding.BinaryMarshaler / BinaryUnmarshaler for binary protocols
  • encoding.TextAppender / BinaryAppender (Go 1.24) for zero-alloc formatting
  • database/sql.Scanner and driver.Valuer for SQL support
  • hash.Cloner optimization for V3/V5 namespace hash states
  • Pool type with NewV4 and NewV7 for amortized crypto/rand overhead
  • NewV4Batch(n) and Generator.NewV7Batch(n) for bulk UUID generation
  • Zero-alloc hot paths for NewV4, NewV7, Pool.NewV4, Pool.NewV7, Parse, MarshalText, UnmarshalText
  • 100% test coverage including fuzz tests