[go] tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs. (#6388)
authorAaron Son <aaron@dolthub.com>
Thu, 7 Jan 2021 19:54:00 +0000 (11:54 -0800)
committerGitHub <noreply@github.com>
Thu, 7 Jan 2021 19:54:00 +0000 (11:54 -0800)
commit41253e574e9064de556032b987e1b22d7283cc37
tree76d2129fd148cd46407f752a1f2a6b32c472089a
parent08d2ce844b1f03fda0a22d911f90943c5984b662
[go] tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs. (#6388)

* tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs.

Calling flags.Parse() within init() races with other packages which register
flags in their init(), and in particular with the testing package itself. It is
more reliable to call flags.Parse() from a TestMain implementation.

See https://github.com/golang/go/issues/31859,
https://github.com/golang/go/issues/33869.

* .github: Enable build-go action in build.yaml workflow.
.github/workflows/build.yml
tests/GoTest.sh
tests/go_test.go
tests/monsterdata_go_wire.mon.sp [new file with mode: 0644]