build on go 1.12 and fix go 1.11 compatibility

This commit is contained in:
Denis Isaev 2019-03-05 21:34:27 +03:00
parent 466006b463
commit be0679ee71
4 changed files with 14 additions and 7 deletions

View File

@ -1,7 +1,6 @@
sudo: false
language: go
go:
- 1.10.x
- 1.11.x
- 1.12.x
script: make check_generated test
@ -21,4 +20,4 @@ deploy:
on:
tags: true
# it's important to build on the newest version of go:
condition: $TRAVIS_GO_VERSION =~ ^1\.11
condition: $TRAVIS_GO_VERSION =~ ^1\.12

View File

@ -891,9 +891,13 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
No, you don't need to do it anymore.
**Which go versions are supported**
Short answer: go 1.10 and newer are supported.
Short answer: go 1.11 and newer are oficially supported.
Long answer: golangci-lint > 1.10.2 supports Go 1.10 and 1.11; golangci-lint <= v1.10.2 supports Go 1.9, 1.10, 1.11.
Long answer:
1. go < 1.9 isn't supported
2. go 1.9 is supported by golangci-lint <= v1.10.2
3. go 1.10 is oficially supported by golangci-lint <= 1.15.0.
4. go1.11 and go1.12 are oficially supported by the latest version of golangci-lint.
**`golangci-lint` doesn't work**

View File

@ -453,9 +453,13 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
No, you don't need to do it anymore.
**Which go versions are supported**
Short answer: go 1.10 and newer are supported.
Short answer: go 1.11 and newer are oficially supported.
Long answer: golangci-lint > 1.10.2 supports Go 1.10 and 1.11; golangci-lint <= v1.10.2 supports Go 1.9, 1.10, 1.11.
Long answer:
1. go < 1.9 isn't supported
2. go 1.9 is supported by golangci-lint <= v1.10.2
3. go 1.10 is oficially supported by golangci-lint <= 1.15.0.
4. go1.11 and go1.12 are oficially supported by the latest version of golangci-lint.
**`golangci-lint` doesn't work**

View File

@ -30,7 +30,7 @@ func errorCheck(outStr string, wantAuto bool, fullshort ...string) (err error) {
for i := range out {
for j := 0; j < len(fullshort); j += 2 {
full, short := fullshort[j], fullshort[j+1]
out[i] = strings.ReplaceAll(out[i], full, short)
out[i] = strings.Replace(out[i], full, short, -1)
}
}