Commit 5587460e authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)

Merge branch '69-go15-compat' into 'master'

Resolve "http.StatusTooManyRequests breaks Go 1.5 compatibility"

This merge request replaces a constant introduced in go1.6 with its literal value, as we need go1.5 support. No other changes are required.

It also modifies .gitlab-ci.yml to test against go1.5, 1.6 and 1.7, to prevent future regressions.

Closes #69

See merge request !73
parents 1ce06acc ddda7737
image: golang:1.6.2
.test_template: &test_definition
script:
- apt-get update -qq && apt-get install -y unzip bzip2
- make test
test:
script:
- apt-get update -qq && apt-get install -y unzip bzip2
- make test
test:go1.5.4:
<<: *test_definition
image: golang:1.5.4
test:go1.6.3:
<<: *test_definition
image: golang:1.6.3
test:go1.7.1:
<<: *test_definition
image: golang:1.7.1
......@@ -28,7 +28,7 @@ func ServiceUnavailable(w http.ResponseWriter, r *http.Request, err error) {
}
func TooManyRequests(w http.ResponseWriter, r *http.Request, err error) {
http.Error(w, "Too Many Requests", http.StatusTooManyRequests)
http.Error(w, "Too Many Requests", 429) // http.StatusTooManyRequests was added in go1.6
captureRavenError(r, err)
printError(r, err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment