We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ccojocar
gcmurphy
Learn more about funding links in repositories.
Report abuse
1 parent 417a44c commit dc5e5a9Copy full SHA for dc5e5a9
testutils/g306_samples.go
@@ -21,7 +21,6 @@ func check(e error) {
21
}
22
23
func main() {
24
-
25
d1 := []byte("hello\ngo\n")
26
err := ioutil.WriteFile("/tmp/dat1", d1, 0744)
27
check(err)
@@ -52,5 +51,25 @@ func main() {
52
51
w.Flush()
53
54
+`}, 1, gosec.NewConfig()},
55
+ {[]string{`
56
+package main
57
+
58
+import (
59
+ "io/ioutil"
60
+ "os"
61
+)
62
63
+func check(e error) {
64
+ if e != nil {
65
+ panic(e)
66
+ }
67
+}
68
69
+func main() {
70
+ content := []byte("hello\ngo\n")
71
+ err := ioutil.WriteFile("/tmp/dat1", content, os.ModePerm)
72
+ check(err)
73
74
`}, 1, gosec.NewConfig()},
75
0 commit comments