From eab78849fc24f890836d00c04b495e64d4fe4187 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 19 Sep 2022 10:50:11 +0200 Subject: [PATCH] cmd/go/internal, go/build: remove unused errGoBuildWithoutBuild Last use was removed by CL 240607. Change-Id: Icfe9e477c6035823bd676a2ff28e1ac202dd991e Reviewed-on: https://go-review.googlesource.com/c/go/+/431662 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Run-TryBot: Tobias Klauser Auto-Submit: Tobias Klauser --- src/cmd/go/internal/imports/build.go | 3 +-- src/cmd/go/internal/modindex/build.go | 3 +-- src/go/build/build.go | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cmd/go/internal/imports/build.go b/src/cmd/go/internal/imports/build.go index bbe08da6b3..be308ceeec 100644 --- a/src/cmd/go/internal/imports/build.go +++ b/src/cmd/go/internal/imports/build.go @@ -36,8 +36,7 @@ var ( goBuildComment = []byte("//go:build") - errGoBuildWithoutBuild = errors.New("//go:build comment without // +build comment") - errMultipleGoBuild = errors.New("multiple //go:build comments") + errMultipleGoBuild = errors.New("multiple //go:build comments") ) func isGoBuildComment(line []byte) bool { diff --git a/src/cmd/go/internal/modindex/build.go b/src/cmd/go/internal/modindex/build.go index d6d4ea371a..8903c156bb 100644 --- a/src/cmd/go/internal/modindex/build.go +++ b/src/cmd/go/internal/modindex/build.go @@ -558,8 +558,7 @@ var ( goBuildComment = []byte("//go:build") - errGoBuildWithoutBuild = errors.New("//go:build comment without // +build comment") - errMultipleGoBuild = errors.New("multiple //go:build comments") + errMultipleGoBuild = errors.New("multiple //go:build comments") ) func isGoBuildComment(line []byte) bool { diff --git a/src/go/build/build.go b/src/go/build/build.go index 4bc34086b3..36d9165125 100644 --- a/src/go/build/build.go +++ b/src/go/build/build.go @@ -1487,8 +1487,7 @@ var ( goBuildComment = []byte("//go:build") - errGoBuildWithoutBuild = errors.New("//go:build comment without // +build comment") - errMultipleGoBuild = errors.New("multiple //go:build comments") + errMultipleGoBuild = errors.New("multiple //go:build comments") ) func isGoBuildComment(line []byte) bool {