Skip to content

Commit d35274a

Browse files
authored
Update README.md
1 parent 0b76be5 commit d35274a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ exclude:
140140

141141
### Exclude code from coverage statistics with comment annotation
142142

143-
For cases where there is a code block that does not need to be tested, it can be ignored from coverage statistics by adding the comment `// coverage-ignore` at the start line of the code block.
143+
For cases where there is a code block that does not need to be tested, it can be ignored from coverage statistics by adding the comment `// coverage-ignore` at the start line of the statement body (right after `{`).
144144

145145
```go
146146
...
@@ -151,7 +151,7 @@ if err != nil { // coverage-ignore
151151
...
152152
```
153153

154-
Similarly, the entire function can be excluded from coverage statistics when a comment is found at the start line of the function body.
154+
Similarly, the entire function can be excluded from coverage statistics when a comment is found at the start line of the function body (right after `{`).
155155
```go
156156
func bar() { // coverage-ignore
157157
...

0 commit comments

Comments
 (0)