mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 20:15:54 +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() {
|
func main() {
|
||||||
e := test()
|
e := test()
|
||||||
fmt.Println(e)
|
fmt.Println(e)
|
||||||
|
}`}, 0}, {[]string{`
|
||||||
|
package main
|
||||||
|
import "strings"
|
||||||
|
func main() {
|
||||||
|
var buf strings.Builder
|
||||||
|
buf.WriteString("test string")
|
||||||
}`}, 0}}
|
}`}, 0}}
|
||||||
|
|
||||||
// SampleCodeG105 - bignum overflow
|
// SampleCodeG105 - bignum overflow
|
||||||
|
|
Loading…
Reference in a new issue