Skip to content

internal/byteorder: new package #67183

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

Closed
wants to merge 26 commits into from

Conversation

mateusz834
Copy link
Member

@mateusz834 mateusz834 commented May 5, 2024

Currently in a lot of packages we define functions for appending/decoding
mostly BigEndian data (see internal/chacha8rand, net/netip,
internal/boring/sha, hash/crc64, and probably more), because we don't
want to depend on encoding/binary, because of #54097.

This change introduces a new package internal/byteorder, that
will allow us to remove all of the functions and replace them with
internal/byteorder.

Updates #54097

@gopherbot
Copy link
Contributor

This PR (HEAD: fc9410d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: b04e715) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 1: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-05T15:09:42Z","revision":"f39788bc5ed75af6838d97faefbf5abdf7a64955"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 1: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 20209f4) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 2: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-05T15:13:43Z","revision":"083b5aeef058669e88323ddab48498021d5a24e3"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Hang Jiang:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 0325169) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 84a1d8c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

This PR (HEAD: ff66442) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 6: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 6:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-05T16:17:19Z","revision":"f5bcb7666c1906e2748c6e6b84d6c9a20d0878f9"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 6: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 6:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-arm64 has failed with summary (view all results):


FAILURE

Tests failed. See all test results.

Error:

shard 2: failed to run "go tool dist test -json": exit status 1
shard 3: failed to run "go tool dist test -json": exit status 1

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 6: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 85f4802) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 7:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 276c63a) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@mateusz834 mateusz834 force-pushed the internal-binary branch 2 times, most recently from 246cafb to c572c81 Compare May 6, 2024 16:19
@gopherbot
Copy link
Contributor

This PR (HEAD: c572c81) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 9:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 9:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

mateusz834 added 16 commits May 10, 2024 08:03
Change-Id: I57d07767908ff2497a54dab0419e5da64f9a080e
Change-Id: Id3177f0724b919f65ac91ed2284580adbce9497b
Change-Id: I78f392576c8516b9bcdd79e1f828ce4012e8cbbd
Change-Id: Ia9d87edac709cf68250a699040fbbdce0476d978
Change-Id: Ic0e37c54c42a3bb66b9cfe5d2392e5134b69d39a
Change-Id: Id4dee4addf708a5c9c2d9b780414306fe0171de4
Change-Id: Ia4e68fac84656613380ccff29ad962b0a8aa0769
Change-Id: I7e1640780753717dd636e880886340ca06f87b20
Change-Id: I118d26201e38cd94f38ec20ee859438b6d78a46e
Change-Id: Ifbf6e0da9b88a95bb1514e146fd7a5773c95d8e1
Change-Id: Id0e74ab369903d329530ec0010da35074c20dd85
Change-Id: I688ffeeeb9eb47a0a7002d2c89a098e1ed2de6cd
Change-Id: I20b6c49d89abb720a07bd65da13fcafacdcc8dcc
@gopherbot
Copy link
Contributor

This PR (HEAD: 3f07d3d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/583298.

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.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 18: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 18:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-10T06:08:22Z","revision":"d3dd1a6effe65ef4cca595042d64f6525b50c4cf"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 18: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 18:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 18: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Cherry Mui:

Patch Set 18: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/583298.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 10, 2024
Currently in a lot of packages we define functions for appending/decoding
mostly BigEndian data (see internal/chacha8rand, net/netip,
internal/boring/sha, hash/crc64, and probably more), because we don't
want to depend on encoding/binary, because of #54097.

This change introduces a new package internal/byteorder, that
will allow us to remove all of the functions and replace them with
internal/byteorder.

Updates #54097

Change-Id: I03e5ea1eb721dd98bdabdb25786f889cc5de54c5
GitHub-Last-Rev: 3f07d3d
GitHub-Pull-Request: #67183
Reviewed-on: https://go-review.googlesource.com/c/go/+/583298
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/583298 has been merged.

@gopherbot gopherbot closed this May 10, 2024
adotkhan pushed a commit to Psiphon-Labs/psiphon-tls that referenced this pull request Dec 10, 2024
Currently in a lot of packages we define functions for appending/decoding
mostly BigEndian data (see internal/chacha8rand, net/netip,
internal/boring/sha, hash/crc64, and probably more), because we don't
want to depend on encoding/binary, because of #54097.

This change introduces a new package internal/byteorder, that
will allow us to remove all of the functions and replace them with
internal/byteorder.

Updates #54097

Change-Id: I03e5ea1eb721dd98bdabdb25786f889cc5de54c5
GitHub-Last-Rev: 3f07d3dfb453a9e679395711f9b93e25f9340a3b
GitHub-Pull-Request: golang/go#67183
Reviewed-on: https://go-review.googlesource.com/c/go/+/583298
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
adotkhan pushed a commit to Psiphon-Labs/utls that referenced this pull request Dec 10, 2024
Currently in a lot of packages we define functions for appending/decoding
mostly BigEndian data (see internal/chacha8rand, net/netip,
internal/boring/sha, hash/crc64, and probably more), because we don't
want to depend on encoding/binary, because of #54097.

This change introduces a new package internal/byteorder, that
will allow us to remove all of the functions and replace them with
internal/byteorder.

Updates #54097

Change-Id: I03e5ea1eb721dd98bdabdb25786f889cc5de54c5
GitHub-Last-Rev: 3f07d3dfb453a9e679395711f9b93e25f9340a3b
GitHub-Pull-Request: golang/go#67183
Reviewed-on: https://go-review.googlesource.com/c/go/+/583298
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
adotkhan pushed a commit to Psiphon-Labs/psiphon-tls that referenced this pull request Feb 10, 2025
Currently in a lot of packages we define functions for appending/decoding
mostly BigEndian data (see internal/chacha8rand, net/netip,
internal/boring/sha, hash/crc64, and probably more), because we don't
want to depend on encoding/binary, because of #54097.

This change introduces a new package internal/byteorder, that
will allow us to remove all of the functions and replace them with
internal/byteorder.

Updates #54097

Change-Id: I03e5ea1eb721dd98bdabdb25786f889cc5de54c5
GitHub-Last-Rev: 3f07d3dfb453a9e679395711f9b93e25f9340a3b
GitHub-Pull-Request: golang/go#67183
Reviewed-on: https://go-review.googlesource.com/c/go/+/583298
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
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.

2 participants