Skip to content

Implement typeid.AnyUUID and typeid.AnyInt64 to support multiple prefixes#6

Merged
klaidliadon merged 9 commits intomasterfrom
explore-any-prefix
Apr 9, 2026
Merged

Implement typeid.AnyUUID and typeid.AnyInt64 to support multiple prefixes#6
klaidliadon merged 9 commits intomasterfrom
explore-any-prefix

Conversation

@VojtechVitek
Copy link
Copy Markdown
Contributor

@VojtechVitek VojtechVitek commented Mar 30, 2026

Fixes #4

@VojtechVitek VojtechVitek changed the title Explore Any prefix Implement typeid.AnyUUID and typeid.AnyInt64 to support multiple prefixes Mar 30, 2026
VojtechVitek and others added 7 commits April 9, 2026 17:03
Shorter names, consistent with UUID[P]/Int64[P] naming convention.
NewAnyUUID/NewAnyInt64 and AnyUUIDFrom/AnyInt64From now take a prefix
argument. Scan no longer clears the prefix.
Pass a [64]byte stack buffer to appendText, eliminating the slice
growth allocation. Typed UUID/Int64 drop to 0 allocs; AnyUUID/AnyInt64
drop from 2 to 1.
Copy link
Copy Markdown
Contributor Author

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Consider renaming to

typeid.AnyPrefixUUID and typeid.AnyPrefixInt64 per our DMs

@klaidliadon klaidliadon merged commit 233678d into master Apr 9, 2026
1 check passed
@klaidliadon klaidliadon deleted the explore-any-prefix branch April 9, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple prefixes per type (variant/environment-aware IDs)

2 participants