The user with no hat
The user with no hat

Reputation: 10866

Where is "Go test" source code documented?

I'm looking for the source code of the "go test" command which afaik does some funky stuff (exports the functions, recompiles the package etc). So far I could find only "testing" and the cmd/go doc

Upvotes: 2

Views: 496

Answers (1)

VonC
VonC

Reputation: 1329672

You can start looking in the cmd/go package, where most of the go commands are defined:

https://github.com/golang/go/blob/1ba29926f3bfd245d46cf1f287716290bc2f1034/src/cmd/go/test.go (last known commit with src/cmd/go/test.go, Go 1.8)
Then commit 4efe925 shows src/cmd/go/test.go being renamed/moved to src/cmd/go/internal/test/test.go in Go 1.9, Jan. 2017.
Last modification: commit ca33f33 in Oct. 2018 for Go 1.12.

Upvotes: 4

Related Questions