From a37acb1837e94652b26c6e8ab69d250be2ce2a50 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 21 Feb 2018 10:22:08 -0500 Subject: [PATCH 1/3] gofmt with go1.10 --- command/format/plan_test.go | 2 +- terraform/interpolate_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/format/plan_test.go b/command/format/plan_test.go index 0a2dc1e36e..a87646cf0a 100644 --- a/command/format/plan_test.go +++ b/command/format/plan_test.go @@ -408,7 +408,7 @@ func TestPlanStats(t *testing.T) { }, }, PlanStats{ - // data resource refreshes are not counted in our stats + // data resource refreshes are not counted in our stats }, }, "replace": { diff --git a/terraform/interpolate_test.go b/terraform/interpolate_test.go index 00aec367da..10f23a2788 100644 --- a/terraform/interpolate_test.go +++ b/terraform/interpolate_test.go @@ -348,8 +348,8 @@ func TestInterpolater_resourceVariableMissingDuringInput(t *testing.T) { &ModuleState{ Path: rootModulePath, Resources: map[string]*ResourceState{ - // No resources at all yet, because we're still dealing - // with input and so the resources haven't been created. + // No resources at all yet, because we're still dealing + // with input and so the resources haven't been created. }, }, }, From 3bc1dcf21a1ce853c386e0d33361caa6fa06c8ed Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 21 Feb 2018 11:25:50 -0500 Subject: [PATCH 2/3] update travis to build with go1.10 Remove the vet target too, since vet is now always run with every test. --- .travis.yml | 3 +-- Makefile | 13 +------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7a2876cdf..1beee560c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: trusty sudo: false language: go go: -- 1.9.1 +- 1.10 # add TF_CONSUL_TEST=1 to run consul tests # they were causing timouts in travis @@ -34,7 +34,6 @@ script: - make vendor-status - make test - make e2etest -- make vet - GOOS=windows go build branches: only: diff --git a/Makefile b/Makefile index 07897daacd..879a1e0352 100644 --- a/Makefile +++ b/Makefile @@ -68,17 +68,6 @@ cover: go tool cover -html=coverage.out rm coverage.out -# vet runs the Go source code static analysis tool `vet` to find -# any common errors. -vet: - @echo 'go vet ./...' - @go vet ./... ; if [ $$? -eq 1 ]; then \ - echo ""; \ - echo "Vet found suspicious constructs. Please check the reported constructs"; \ - echo "and fix them if necessary before submitting the code for review."; \ - exit 1; \ - fi - # generate runs `go generate` to build the dynamically generated # source files. generate: @@ -102,4 +91,4 @@ vendor-status: # under parallel conditions. .NOTPARALLEL: -.PHONY: bin cover default dev e2etest fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet +.PHONY: bin cover default dev e2etest fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status From d4415bdd7d0c8194bb062ec0332627ecf456b62a Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 21 Feb 2018 11:37:06 -0500 Subject: [PATCH 3/3] try travis go version as string --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1beee560c3..c11f41424f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: trusty sudo: false language: go go: -- 1.10 +- "1.10" # add TF_CONSUL_TEST=1 to run consul tests # they were causing timouts in travis