]> Cypherpunks repositories - gostls13.git/commit
go/build: clean up ctxt.shouldBuild, tests
authorRuss Cox <rsc@golang.org>
Fri, 22 May 2020 18:40:50 +0000 (14:40 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 Oct 2020 18:31:36 +0000 (18:31 +0000)
commit8994607f828e46272bae5e7959997dea8cb1a19a
tree588867a18e7b57e27eb33ad1aa0b88ed7b4b8112
parent112c4d569e8881cc9910039bf4c45176a9b1f619
go/build: clean up ctxt.shouldBuild, tests

Make ctxt.shouldBuild return multiple values
instead of modifying *sawBinaryOnly in place.
Also give it a table-driven test.

Cleanup in preparation for boolean expressions,
but nice even if those don't end up happening.

Change-Id: Ibb78b0080070deafac7299a6de87ab8bebeb702d
Reviewed-on: https://go-review.googlesource.com/c/go/+/240598
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/go/build/build.go
src/go/build/build_test.go