aboutsummaryrefslogtreecommitdiff
path: root/src/internal/bytealg
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2023-03-02 17:09:22 -0500
committerMichael Pratt <mpratt@google.com>2023-03-02 22:56:35 +0000
commit79d4e894ed9d31396c3e25e7b9a9e99a7c6537e7 (patch)
tree06e6aa0e94fe14c94b261f05cb86af83f9b88635 /src/internal/bytealg
parent6f4d986a5af3245a3c66172e5fab9609652ff219 (diff)
downloadgo-79d4e894ed9d31396c3e25e7b9a9e99a7c6537e7.tar.xz
all: move //go: function directives directly above functions
These directives affect the next declaration, so the existing form is valid, but can be confusing because it is easy to miss. Move then directly above the declaration for improved readability. CL 69120 previously moved the Gosched nosplit away to hide it from documentation. Since CL 224737, directives are automatically excluded from documentation. Change-Id: I8ebf2d47fbb5e77c6f40ed8afdf79eaa4f4e335e Reviewed-on: https://go-review.googlesource.com/c/go/+/472957 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/internal/bytealg')
-rw-r--r--src/internal/bytealg/index_native.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/internal/bytealg/index_native.go b/src/internal/bytealg/index_native.go
index 6e4a2f39e4..59c93f9d12 100644
--- a/src/internal/bytealg/index_native.go
+++ b/src/internal/bytealg/index_native.go
@@ -6,14 +6,14 @@
package bytealg
-//go:noescape
-
// Index returns the index of the first instance of b in a, or -1 if b is not present in a.
// Requires 2 <= len(b) <= MaxLen.
-func Index(a, b []byte) int
-
+//
//go:noescape
+func Index(a, b []byte) int
// IndexString returns the index of the first instance of b in a, or -1 if b is not present in a.
// Requires 2 <= len(b) <= MaxLen.
+//
+//go:noescape
func IndexString(a, b string) int