machine: use new internal/binary package

The encoding/binary package in Go 1.23 imports the slices package, which
results in circular import when imported from the machine package.
Therefore, encoding/binary cannot be used in the machine package.

This commit fixes that by introducing a new internal/binary package that
is just plain Go code without dependencies. It can be safely used
anywhere (including the runtime if needed).
This commit is contained in:
Ayke van Laethem
2024-06-24 17:26:58 +02:00
committed by Ron Evans
parent 868262f4a7
commit 1270a50104
12 changed files with 43 additions and 10 deletions
+1
View File
@@ -236,6 +236,7 @@ func pathsToOverride(goMinor int, needsSyscallPackage bool) map[string]bool {
"device/": false,
"examples/": false,
"internal/": true,
"internal/binary/": false,
"internal/bytealg/": false,
"internal/fuzz/": false,
"internal/reflectlite/": false,