mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 20:15:54 +00:00
Fix the WriteSring test by handling the error
This commit is contained in:
parent
adb42220da
commit
ae82798b9c
1 changed files with 4 additions and 1 deletions
|
@ -169,7 +169,10 @@ package main
|
||||||
import "strings"
|
import "strings"
|
||||||
func main() {
|
func main() {
|
||||||
var buf strings.Builder
|
var buf strings.Builder
|
||||||
buf.WriteString("test string")
|
_, err := buf.WriteString("test string")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}`}, 0}}
|
}`}, 0}}
|
||||||
|
|
||||||
// SampleCodeG105 - bignum overflow
|
// SampleCodeG105 - bignum overflow
|
||||||
|
|
Loading…
Reference in a new issue