aboutsummaryrefslogtreecommitdiff
path: root/src/internal/bytealg/indexbyte_generic.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/bytealg/indexbyte_generic.go')
-rw-r--r--src/internal/bytealg/indexbyte_generic.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/internal/bytealg/indexbyte_generic.go b/src/internal/bytealg/indexbyte_generic.go
index ef7801e5e1..6bff31ceee 100644
--- a/src/internal/bytealg/indexbyte_generic.go
+++ b/src/internal/bytealg/indexbyte_generic.go
@@ -6,8 +6,6 @@
package bytealg
-import _ "unsafe" // for go:linkname
-
func IndexByte(b []byte, c byte) int {
for i, x := range b {
if x == c {
@@ -25,23 +23,3 @@ func IndexByteString(s string, c byte) int {
}
return -1
}
-
-//go:linkname bytes_IndexByte bytes.IndexByte
-func bytes_IndexByte(b []byte, c byte) int {
- for i, x := range b {
- if x == c {
- return i
- }
- }
- return -1
-}
-
-//go:linkname strings_IndexByte strings.IndexByte
-func strings_IndexByte(s string, c byte) int {
- for i := 0; i < len(s); i++ {
- if s[i] == c {
- return i
- }
- }
- return -1
-}