-
Notifications
You must be signed in to change notification settings - Fork 212
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
Allow int
, uint
, and float
as map keys
#958
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
daniel-weisse
force-pushed
the
int-map-keys
branch
from
July 16, 2024 13:24
37d71da
to
732c977
Compare
Feels like a good ergonomics improvement. Thank you for the patch! |
dmathieu
referenced
this pull request
in open-telemetry/opentelemetry-go-contrib
Aug 26, 2024
…6040) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) | `v2.2.2` -> `v2.2.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pelletier/go-toml (github.com/pelletier/go-toml/v2)</summary> ### [`v2.2.3`](https://github.com/pelletier/go-toml/releases/tag/v2.2.3) [Compare Source](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.3) <!-- Release notes generated using configuration in .github/release.yml at v2.2.3 --> #### What's Changed ##### What's new - Allow `int`, `uint`, and `float` as map keys by [@​daniel-weisse](https://github.com/daniel-weisse) in [https://github.com/pelletier/go-toml/pull/958](https://github.com/pelletier/go-toml/pull/958) ##### Performance - Remove unstable.Parser allocation when creating Decoder by [@​mvdan](https://github.com/mvdan) in [https://github.com/pelletier/go-toml/pull/953](https://github.com/pelletier/go-toml/pull/953) ##### Fixed bugs - Fix reflect.Pointer backward compatibility by [@​xxxVitoxxx](https://github.com/xxxVitoxxx) in [https://github.com/pelletier/go-toml/pull/956](https://github.com/pelletier/go-toml/pull/956) ##### Documentation - Fix readme typo by [@​testwill](https://github.com/testwill) in [https://github.com/pelletier/go-toml/pull/951](https://github.com/pelletier/go-toml/pull/951) ##### Other changes - go.mod: bump minimum language version to 1.21 by [@​mvdan](https://github.com/mvdan) in [https://github.com/pelletier/go-toml/pull/949](https://github.com/pelletier/go-toml/pull/949) - Bump testing to go 1.23 by [@​pelletier](https://github.com/pelletier) in [https://github.com/pelletier/go-toml/pull/961](https://github.com/pelletier/go-toml/pull/961) #### New Contributors - [@​mvdan](https://github.com/mvdan) made their first contribution in [https://github.com/pelletier/go-toml/pull/949](https://github.com/pelletier/go-toml/pull/949) - [@​testwill](https://github.com/testwill) made their first contribution in [https://github.com/pelletier/go-toml/pull/951](https://github.com/pelletier/go-toml/pull/951) - [@​xxxVitoxxx](https://github.com/xxxVitoxxx) made their first contribution in [https://github.com/pelletier/go-toml/pull/956](https://github.com/pelletier/go-toml/pull/956) **Full Changelog**: pelletier/go-toml@v2.2.2...v2.2.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the toml specification, integers (or even floats) may be used as keys.
This PR adds functionality to
*Encoder.keyToString
and*decoder.keyFromData
to convertint
s,uint
s, andfloat
s to and from string.benchstat results