bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.37k stars 651 forks source link

Fix revive warning in testmain.go files #3958

Closed EdSchouten closed 3 months ago

EdSchouten commented 3 months ago

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

When configuring nogo() to run the revive linter, we currently see builds of testmain.go files fail with the following error:

if block ends with call to os.Exit function, so drop this else and outdent its block (move short variable declaration to its own line if necessary)

Let's restructure this code slightly, so that this is no longer an issue.

Which issues(s) does this PR fix?

N/A

Other notes for review