mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
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:
committed by
Ron Evans
parent
868262f4a7
commit
1270a50104
@@ -1,7 +1,7 @@
|
||||
package descriptor
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"internal/binary"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package descriptor
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"internal/binary"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package descriptor
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"internal/binary"
|
||||
)
|
||||
|
||||
var endpointEP1IN = [endpointTypeLen]byte{
|
||||
|
||||
@@ -2,8 +2,8 @@ package descriptor
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"internal/binary"
|
||||
)
|
||||
|
||||
var configurationCDCHID = [configurationTypeLen]byte{
|
||||
|
||||
Reference in New Issue
Block a user