Skip to content

Add setof helper package #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged

Add setof helper package #391

merged 1 commit into from
May 13, 2025

Conversation

klauspost
Copy link
Collaborator

Package setof allows serializing sets map[T]struct{} as arrays - as compared to a map, which only allows for string keys.

Nil maps are preserved as a nil value on stream.

A deterministic (sorted) version is available, with slightly lower performance.

Kind of marginal, but keeping it as a separate package makes it so it doesn't pollute the main namespace.

Package setof allows serializing sets map[T]struct{} as arrays.

Nil maps are preserved as a nil value on stream.

A deterministic (sorted) version is available, with slightly lower performance.
@klauspost klauspost requested a review from philhofer April 21, 2025 16:49
@klauspost klauspost merged commit 12160bd into tinylib:master May 13, 2025
4 checks passed
@klauspost klauspost deleted the setof branch May 13, 2025 12:23
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.

1 participant