Want to Ignore code block from coverage as it cannot be covered with integration test

I have generated code coverage for golang source code and using sonarqube to do the analysis on it. I have used integration tests to hit source code. Problem is there is some blocks of source code which cannot be hit as part of integration tests as that code is edge case specific to production failures. Because of that code, my code coverage percentage is going down.
Is there a way to ignore that particular blocks of code, for example inside one file from line 122 to line 127, in other file from line 222 to line 234. I want to exclude this from coverage(not the whole file). It should show not covered in sonarqube UI.

I have already tried to use Narrowing the focus with an analysis scope

sonar.issue.ignore.block=BLOCK1,BLOCK2

Block 1 settings

sonar.issue.ignore.block.BLOCK1.beginBlockRegexp=//\s*START-IGNORE-BLOCK-1

sonar.issue.ignore.block.BLOCK1.endBlockRegexp=//\s*END-IGNORE-BLOCK-1

Block 2 settings

sonar.issue.ignore.block.BLOCK2.beginBlockRegexp=//\s*START-IGNORE-BLOCK-2

sonar.issue.ignore.block.BLOCK2.endBlockRegexp=//\s*END-IGNORE-BLOCK-2

Hey there.

SonarQube relies entirely on the coverage report (with the exception of file-level code coverage exclusions) to tell it which lines can be covered. I suggest investigating what mechanisms your coverage tool has to suppress reporting coverage on specific lines.

Thanks Colin.