Enable the whitespace linter and fix the errors resulting from it.
Also:
* Remove unneeded golangci-lint config for disabled linters.
* Correct test number for panic in previous commit.
Use setup-go caching instead of manually rolled version.
Also:
* Bump golangci-lint to 1.50.1.
* Add go 1.19 to test / lint matrix.
* Bump timeout to 6 mins.
Disable new linters which aren't compatible with this code module.
Upgrade github actions to fix caching issues.
Run go mod to bring in new styling.
Remove space on nolint declarations.
Apply all changes to whitespace as required to pass goimports linter.
Only trigger checks on pull_request which works for pulls from other
forks, where as push only works from the same repo.
Leverage github actions for tests and linting.
This includes fixing a bunch of issues highlighted by golangci
including:
* Dead code.
* Ineffectual assigns.
* Goto warnings.
* Nil return err.
* Reused literal strings.
* Test parameter order.
Also:
* Setup clog.