forked from quic-go/quic-go
update CIs to Go 1.11
This commit is contained in:
@@ -37,17 +37,17 @@ defaults: &defaults
|
||||
|
||||
version: 2
|
||||
jobs:
|
||||
build-go1.11:
|
||||
docker:
|
||||
- image: circleci/golang:1.11rc1-stretch-browsers
|
||||
<<: *defaults
|
||||
build-go1.10:
|
||||
docker:
|
||||
- image: circleci/golang:1.10.3-stretch-browsers
|
||||
<<: *defaults
|
||||
build-go1.9:
|
||||
docker:
|
||||
- image: circleci/golang:1.9.7-stretch-browsers
|
||||
<<: *defaults
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- build-go1.9
|
||||
- build-go1.10
|
||||
- build-go1.11
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
],
|
||||
"Linters": {
|
||||
"vet": "go tool vet -printfuncs=Infof,Debugf,Warningf,Errorf:PATH:LINE:MESSAGE",
|
||||
"misspell": "misspell -i ect:PATH:LINE:COL:MESSAGE"
|
||||
"misspell": "misspell -i ect:PATH:LINE:COL:MESSAGE",
|
||||
"megacheck": "megacheck -ignore github.com/lucas-clemente/quic-go/h2quic/response_writer_closenotifier.go:SA1019:PATH:LINE:COL:MESSAGE"
|
||||
}
|
||||
}
|
||||
|
||||
11
.travis.yml
11
.travis.yml
@@ -8,8 +8,8 @@ addons:
|
||||
language: go
|
||||
|
||||
go:
|
||||
- "1.9.7"
|
||||
- "1.10.3"
|
||||
- "1.11rc1"
|
||||
|
||||
# first part of the GOARCH workaround
|
||||
# setting the GOARCH directly doesn't work, since the value will be overwritten later
|
||||
@@ -24,6 +24,15 @@ env:
|
||||
- TRAVIS_GOARCH=386 TESTMODE=unit
|
||||
- TRAVIS_GOARCH=386 TESTMODE=integration
|
||||
|
||||
# Linters might work differently in different Go versions.
|
||||
# Only run them in the most recent one.
|
||||
matrix:
|
||||
exclude:
|
||||
- go: "1.10.3"
|
||||
env: TRAVIS_GOARCH=amd64 TESTMODE=lint
|
||||
- go: "1.10.3"
|
||||
env: TRAVIS_GOARCH=386 TESTMODE=lint
|
||||
|
||||
# second part of the GOARCH workaround
|
||||
# now actually set the GOARCH env variable to the value of the temporary variable set earlier
|
||||
before_install:
|
||||
|
||||
@@ -14,8 +14,8 @@ clone_folder: c:\gopath\src\github.com\lucas-clemente\quic-go
|
||||
|
||||
install:
|
||||
- rmdir c:\go /s /q
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.10.3.windows-amd64.zip
|
||||
- 7z x go1.10.3.windows-amd64.zip -y -oC:\ > NUL
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.11rc1.windows-amd64.zip
|
||||
- 7z x go1.11rc1.windows-amd64.zip -y -oC:\ > NUL
|
||||
- set PATH=%PATH%;%GOPATH%\bin\windows_%GOARCH%;%GOPATH%\bin
|
||||
- echo %PATH%
|
||||
- echo %GOPATH%
|
||||
|
||||
@@ -98,9 +98,6 @@ func (w *responseWriter) CloseNotify() <-chan bool { return make(<-chan bool) }
|
||||
// test that we implement http.Flusher
|
||||
var _ http.Flusher = &responseWriter{}
|
||||
|
||||
// test that we implement http.CloseNotifier
|
||||
var _ http.CloseNotifier = &responseWriter{}
|
||||
|
||||
// copied from http2/http2.go
|
||||
// bodyAllowedForStatus reports whether a given response status code
|
||||
// permits a body. See RFC 2616, section 4.4.
|
||||
|
||||
9
h2quic/response_writer_closenotifier.go
Normal file
9
h2quic/response_writer_closenotifier.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package h2quic
|
||||
|
||||
import "net/http"
|
||||
|
||||
// The CloseNotifier is a deprecated interface, and staticcheck will report that from Go 1.11.
|
||||
// By defining it in a separate file, we can exclude this file from staticcheck.
|
||||
|
||||
// test that we implement http.CloseNotifier
|
||||
var _ http.CloseNotifier = &responseWriter{}
|
||||
Reference in New Issue
Block a user