Skip to content

Commit ae82798

Browse files
ccojocarCosmin Cojocar
authored andcommitted
Fix the WriteSring test by handling the error
1 parent adb4222 commit ae82798

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testutils/source.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ package main
169169
import "strings"
170170
func main() {
171171
var buf strings.Builder
172-
buf.WriteString("test string")
172+
_, err := buf.WriteString("test string")
173+
if err != nil {
174+
panic(err)
175+
}
173176
}`}, 0}}
174177

175178
// SampleCodeG105 - bignum overflow

0 commit comments

Comments
 (0)