mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 20:15:54 +00:00
Build the code sample for string builder only fron Go 1.10 onwards
This commit is contained in:
parent
ae82798b9c
commit
2695567487
1 changed files with 6 additions and 1 deletions
|
@ -165,6 +165,8 @@ func main() {
|
||||||
e := test()
|
e := test()
|
||||||
fmt.Println(e)
|
fmt.Println(e)
|
||||||
}`}, 0}, {[]string{`
|
}`}, 0}, {[]string{`
|
||||||
|
// +build go1.10
|
||||||
|
|
||||||
package main
|
package main
|
||||||
import "strings"
|
import "strings"
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -173,7 +175,10 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}`}, 0}}
|
}`, `
|
||||||
|
package main
|
||||||
|
func dummy(){}
|
||||||
|
`}, 0}}
|
||||||
|
|
||||||
// SampleCodeG105 - bignum overflow
|
// SampleCodeG105 - bignum overflow
|
||||||
SampleCodeG105 = []CodeSample{{[]string{`
|
SampleCodeG105 = []CodeSample{{[]string{`
|
||||||
|
|
Loading…
Reference in a new issue