diff --git a/src/runtime/bytes.go b/src/runtime/bytes.go new file mode 100644 index 00000000..6b3d6be7 --- /dev/null +++ b/src/runtime/bytes.go @@ -0,0 +1,11 @@ +package runtime + +//go:linkname indexBytePortable internal/bytealg.IndexByte +func indexBytePortable(s []byte, c byte) int { + for i, b := range s { + if b == c { + return i + } + } + return -1 +}