Just to be sure, you are importing coverage report from go test, right?
Is the problematic file containing only const and/or enums?
What I suspect to happen is that go test will not consider const, and not add the file at all in the report if it contains only const. In this case, we are computing a coverage approximation, wrongly considering const and enums.
In the meantime, if you don’t plan to add code in this file, the workaround is to exclude these files from the coverage (via sonar.coverage.exclusions, or General Settings > Analysis Scope > Code Coverage > Coverage Exclusions in the UI), since there is nothing to cover anyway.