Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ coverage
# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand All @@ -29,7 +29,7 @@ bower_components
# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
Expand Down
6 changes: 4 additions & 2 deletions pkg/golinters/mnd/testdata/mnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ func UseMagicNumber() {
Timeout: 2 * time.Second, // want "Magic number: 2, in <assign> detected"
}

res, err := c.Get("http://www.google.com")
res, err := c.Get("https://www.google.com")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode != 200 { // want "Magic number: 200, in <condition> detected"
log.Println("Something went wrong")
}
Expand All @@ -26,10 +27,11 @@ func UseNoMagicNumber() {
Timeout: time.Second,
}

res, err := c.Get("http://www.google.com")
res, err := c.Get("https://www.google.com")
if err != nil {
log.Fatal(err)
}

if res.StatusCode != http.StatusOK {
log.Println("Something went wrong")
}
Expand Down
Loading