Clean up warnings from the staticcheck tool in the Go SDK with the aim of eventually enabling staticcheck as a precommit. Imported from Jira [BEAM-14240](https://issues.apache.org/jira/browse/BEAM-14240). Original Jira may contain additional context. Reported by: jrmccluskey.