]> Cypherpunks repositories - gostls13.git/commitdiff
go/build/constraint: fix splitPlusBuild func doc comment
authorAlberto Donizetti <alb.donizetti@gmail.com>
Tue, 23 Feb 2021 14:05:33 +0000 (15:05 +0100)
committerRuss Cox <rsc@golang.org>
Tue, 23 Feb 2021 16:48:00 +0000 (16:48 +0000)
Noticed while reading the code of the new package; likely a copy-paste
from the splitGoBuild function, which is almost identical.

Change-Id: I869272123708d25d237a4f0445f8e853865747f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/295469
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/go/build/constraint/expr.go

index 3b278702f808b3346e2734ae7aa91480d542825e..1ef707ceacffbb8a9fcb64ee74d88147b091a806 100644 (file)
@@ -355,8 +355,8 @@ func IsPlusBuild(line string) bool {
        return ok
 }
 
-// splitGoBuild splits apart the leading //go:build prefix in line from the build expression itself.
-// It returns "", false if the input is not a //go:build line or if the input contains multiple lines.
+// splitPlusBuild splits apart the leading // +build prefix in line from the build expression itself.
+// It returns "", false if the input is not a // +build line or if the input contains multiple lines.
 func splitPlusBuild(line string) (expr string, ok bool) {
        // A single trailing newline is OK; otherwise multiple lines are not.
        if len(line) > 0 && line[len(line)-1] == '\n' {