Prior to the SonarQube analysis, execute your unit tests:
go test -json > report.json
-jsonflag is supported since go 1.10
Import the report while running the SonarQube analysis by providing the paths of the unit test execution reports through the following properties. The paths may be absolute or relative to the project base directory.
Property Scope Description
Project-wide comma-separated list of paths to unit test report files.