aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-02-18 09:43:56 +0100
committerGravatar GitHub <noreply@github.com> 2018-02-18 09:43:56 +0100
commit05e41c59698cadb6c43452504e4a999570ab93b0 (patch)
tree268fba133fb552c14b6c7828008f28c6e7369305
parent8cce06cba10c42ce501a57bd3b7d06ca6064d774 (diff)
downloadcoredns-05e41c59698cadb6c43452504e4a999570ab93b0.tar.gz
coredns-05e41c59698cadb6c43452504e4a999570ab93b0.tar.zst
coredns-05e41c59698cadb6c43452504e4a999570ab93b0.zip
go 1.10: update travis and gofmt (#1541)
* go 1.10: update travis and gofmt fmt now complains about on file tls_test.go, fix that. Also remove gofmt, as goimports also checks, so this was done twice. Put go 1.9 and 1.10 in travis for the time being. * goimports optional
-rw-r--r--.travis.yml3
-rw-r--r--Makefile8
-rw-r--r--plugin/tls/tls_test.go4
3 files changed, 10 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 7d42ca0dd..0f09b8a90 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,8 @@ services:
language: go
go:
- - 1.9
+ - "1.9"
+ - "1.10"
go_import_path: github.com/coredns/coredns
diff --git a/Makefile b/Makefile
index b57bdffa0..020abdc80 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ coredns: $(CHECKS)
CGO_ENABLED=0 $(SYSTEM) go build $(VERBOSE) -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$(GITCOMMIT)" -o $(BINARY)
.PHONY: check
-check: linter core/zplugin.go core/dnsserver/zdirectives.go godeps
+check: linter goimports core/zplugin.go core/dnsserver/zdirectives.go godeps
.PHONY: test
test: check
@@ -78,7 +78,11 @@ gen:
linter:
go get -u github.com/alecthomas/gometalinter
gometalinter --install golint
- gometalinter --deadline=2m --disable-all --enable=gofmt --enable=golint --enable=vet --enable=goimports --exclude=^vendor/ --exclude=^pb/ ./...
+ gometalinter --deadline=2m --disable-all --enable=golint --enable=vet --vendor --exclude=^pb/ ./...
+
+.PHONY: goimports
+goimports:
+ ( gometalinter --deadline=2m --disable-all --enable=goimports --vendor --exclude=^pb/ ./... || true )
.PHONY: clean
clean:
diff --git a/plugin/tls/tls_test.go b/plugin/tls/tls_test.go
index 2374d772c..152abedfe 100644
--- a/plugin/tls/tls_test.go
+++ b/plugin/tls/tls_test.go
@@ -18,8 +18,8 @@ func TestTLS(t *testing.T) {
expectedRoot string // expected root, set to the controller. Empty for negative cases.
expectedErrContent string // substring from the expected error. Empty for positive cases.
}{
- // positive
- // negative
+ // positive
+ // negative
}
for i, test := range tests {