mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
add test case for strings.Builder G104 whitelist inclusion
This commit is contained in:
parent
41809946d4
commit
9b966a447e
1 changed files with 6 additions and 0 deletions
|
@ -164,6 +164,12 @@ func test() error {
|
|||
func main() {
|
||||
e := test()
|
||||
fmt.Println(e)
|
||||
}`}, 0}, {[]string{`
|
||||
package main
|
||||
import "strings"
|
||||
func main() {
|
||||
var buf strings.Builder
|
||||
buf.WriteString("test string")
|
||||
}`}, 0}}
|
||||
|
||||
// SampleCodeG105 - bignum overflow
|
||||
|
|
Loading…
Reference in a new issue