File tree Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 15
15
package main
16
16
17
17
import (
18
+ "sort"
18
19
"strings"
19
20
20
21
"github.com/ryanuber/go-glob"
@@ -41,6 +42,7 @@ func (f *fileList) String() string {
41
42
for p := range f .patterns {
42
43
ps = append (ps , p )
43
44
}
45
+ sort .Strings (ps )
44
46
return strings .Join (ps , ", " )
45
47
}
46
48
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ func Test_fileList_String(t *testing.T) {
65
65
},
66
66
{
67
67
name : "two patterns" ,
68
- fields : fields {patterns : []string {"foo " , "bar " }},
69
- want : "foo, bar " ,
68
+ fields : fields {patterns : []string {"bar " , "foo " }},
69
+ want : "bar, foo " ,
70
70
},
71
71
}
72
72
for _ , tt := range tests {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ package main
22
22
import (
23
23
_ "crypto/md5"
24
24
"fmt"
25
+ "os"
25
26
)
26
27
func main() {
27
28
for _, arg := range os.Args {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ func TestNosecBlock(t *testing.T) {
49
49
`package main
50
50
import (
51
51
"os"
52
- "os/exect "
52
+ "os/exec "
53
53
)
54
54
55
55
func main() {
Original file line number Diff line number Diff line change @@ -89,8 +89,6 @@ func TestSQLInjectionFalsePositiveA(t *testing.T) {
89
89
package main
90
90
import (
91
91
"database/sql"
92
- "fmt"
93
- "os"
94
92
//_ "github.com/mattn/go-sqlite3"
95
93
)
96
94
@@ -125,8 +123,6 @@ func TestSQLInjectionFalsePositiveB(t *testing.T) {
125
123
package main
126
124
import (
127
125
"database/sql"
128
- "fmt"
129
- "os"
130
126
//_ "github.com/mattn/go-sqlite3"
131
127
)
132
128
@@ -161,8 +157,6 @@ func TestSQLInjectionFalsePositiveC(t *testing.T) {
161
157
package main
162
158
import (
163
159
"database/sql"
164
- "fmt"
165
- "os"
166
160
//_ "github.com/mattn/go-sqlite3"
167
161
)
168
162
@@ -197,8 +191,6 @@ func TestSQLInjectionFalsePositiveD(t *testing.T) {
197
191
package main
198
192
import (
199
193
"database/sql"
200
- "fmt"
201
- "os"
202
194
//_ "github.com/mattn/go-sqlite3"
203
195
)
204
196
You can’t perform that action at this time.
0 commit comments