File tree 2 files changed +6
-4
lines changed
pkg/golinters/mnd/testdata
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ coverage
20
20
# nyc test coverage
21
21
.nyc_output
22
22
23
- # Grunt intermediate storage (http ://gruntjs.com/creating-plugins#storing-task-files)
23
+ # Grunt intermediate storage (https ://gruntjs.com/creating-plugins#storing-task-files)
24
24
.grunt
25
25
26
26
# Bower dependency directory (https://bower.io/)
@@ -29,7 +29,7 @@ bower_components
29
29
# node-waf configuration
30
30
.lock-wscript
31
31
32
- # Compiled binary addons (http ://nodejs.org/api/addons.html)
32
+ # Compiled binary addons (https ://nodejs.org/api/addons.html)
33
33
build /Release
34
34
35
35
# Dependency directories
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ func UseMagicNumber() {
12
12
Timeout : 2 * time .Second , // want "Magic number: 2, in <assign> detected"
13
13
}
14
14
15
- res , err := c .Get ("http ://www.google.com" )
15
+ res , err := c .Get ("https ://www.google.com" )
16
16
if err != nil {
17
17
log .Fatal (err )
18
18
}
19
+ defer res .Body .Close ()
19
20
if res .StatusCode != 200 { // want "Magic number: 200, in <condition> detected"
20
21
log .Println ("Something went wrong" )
21
22
}
@@ -26,10 +27,11 @@ func UseNoMagicNumber() {
26
27
Timeout : time .Second ,
27
28
}
28
29
29
- res , err := c .Get ("http ://www.google.com" )
30
+ res , err := c .Get ("https ://www.google.com" )
30
31
if err != nil {
31
32
log .Fatal (err )
32
33
}
34
+
33
35
if res .StatusCode != http .StatusOK {
34
36
log .Println ("Something went wrong" )
35
37
}
You can’t perform that action at this time.
0 commit comments