1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-13 21:52:08 +00:00

Updated api bool fields with default=true to *bool. Go modules and vendor files

This commit is contained in:
rawmind0
2020-05-20 20:30:18 +02:00
parent 94e9c1a01c
commit 43627bcf20
139 changed files with 4746 additions and 3676 deletions

View File

@@ -1,18 +1,19 @@
sudo: false
language: go
go:
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- master
matrix:
allow_failures:
- go: master
fast_finish: true
include:
- go: 1.10.x
- go: 1.11.x
env: GOFMT=1
- go: master
install:
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
script:
- go get -t -v ./...
- if test -n "${GOFMT}"; then gofmt -w -s . && git diff --exit-code; fi
- diff -u <(echo -n) <(gofmt -d .)
- go tool vet .
- go test -v -race ./...

View File

@@ -416,14 +416,14 @@ func canStaleOnError(respHeaders, reqHeaders http.Header) bool {
func getEndToEndHeaders(respHeaders http.Header) []string {
// These headers are always hop-by-hop
hopByHopHeaders := map[string]struct{}{
"Connection": {},
"Keep-Alive": {},
"Proxy-Authenticate": {},
"Proxy-Authorization": {},
"Te": {},
"Trailers": {},
"Transfer-Encoding": {},
"Upgrade": {},
"Connection": struct{}{},
"Keep-Alive": struct{}{},
"Proxy-Authenticate": struct{}{},
"Proxy-Authorization": struct{}{},
"Te": struct{}{},
"Trailers": struct{}{},
"Transfer-Encoding": struct{}{},
"Upgrade": struct{}{},
}
for _, extra := range strings.Split(respHeaders.Get("connection"), ",") {
@@ -433,7 +433,7 @@ func getEndToEndHeaders(respHeaders http.Header) []string {
}
}
endToEndHeaders := []string{}
for respHeader := range respHeaders {
for respHeader, _ := range respHeaders {
if _, ok := hopByHopHeaders[respHeader]; !ok {
endToEndHeaders = append(endToEndHeaders, respHeader)
}