net,net/netip: implement the encoding.(Binary|Text)Appender
Implement the encoding.TextAppender interface for "net.IP".
Implement the encoding.(Binary|Text)Appender interfaces for "netip.Addr", "netip.AddrPort" and "netip.Prefix".
"net.IP.MarshalText" also gets some performance improvements:
│ old │ new │
│ sec/op │ sec/op vs base │
IPMarshalText/IPv4-8 68.35n ± 1% 14.64n ± 1% -78.57% (p=0.000 n=10) IPMarshalText/IPv6-8 124.35n ± 2% 62.73n ± 1% -49.55% (p=0.000 n=10) geomean 92.19n 30.31n -67.12%
│ old │ new │
│ B/op │ B/op vs base │
IPMarshalText/IPv4-8 32.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
│ old │ new │
│ allocs/op │ allocs/op vs base │
IPMarshalText/IPv4-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
All exported types in the standard library that implement the "encoding.(Binary|Text)Marshaler" now also implement the "encoding.(Binary|Text)Appender".
Fixes #62384
This PR (HEAD: 4ebb58eeec21a29a57f0c054cda6a924012828e3) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Gopher Robot:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 75e6f0d64ed8e1b761bc98aefdd4bd6811c40b35) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from kyose chang:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 2:
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Mateusz Poliwczak:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Mateusz Poliwczak:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: ac1d994ba7bf8eef225c6bc598e10b8e6f51f53b) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from kyose chang:
Patch Set 2:
(3 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Damien Neil:
Patch Set 3:
(4 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 7c3dd9bc97b23bc261e299510d73c397328e2554) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from kyose chang:
Patch Set 4:
(3 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from kyose chang:
Patch Set 4:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 3268c0d5d535d3e011a19c6bfca58b07f1d48cd3) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Ian Lance Taylor:
Patch Set 5: Commit-Queue+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 5:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-08-23T00:32:54Z","revision":"c863dfcaebad119aa69037e73dd31809ca06a48c"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 5: -Commit-Queue
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 5:
This CL has passed the run
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 5: LUCI-TryBot-Result+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from kyose chang:
Patch Set 5:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 2e7adace5f30a4f6730fe1a8a06ceb650e0432e4) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from kyose chang:
Patch Set 6:
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: e66bcef687d28b352cd8bfe073cedc411e2b1e7a) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Ian Lance Taylor:
Patch Set 7:
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 5d27854725d957dd89d2ddc4342ca97999d10cb2) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from kyose chang:
Patch Set 7:
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 8: Auto-Submit+1 Code-Review+2 Commit-Queue+1
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 8:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-09-20T21:17:55Z","revision":"dfae05efcafef87101cf7157a7a88c4a2da60ca2"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. After addressing review feedback, remember to publish your drafts!