Skip to content

Commit 445d68f

Browse files
AndresCidoncharaphink
authored andcommitted
fix: make test fails due to golint changes!
1 parent 661d29d commit 445d68f

File tree

4 files changed

+19
-115
lines changed

4 files changed

+19
-115
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ terraboard: main.go $(DEPS)
1010
strip $@
1111

1212
lint:
13-
@ go get -v github.com/golang/lint/golint
13+
@ go get -v golang.org/x/lint/golint
1414
@for file in $$(git ls-files '*.go' | grep -v '_workspace/'); do \
1515
export output="$$(golint $${file} | grep -v 'type name will be used as docker.DockerInfo')"; \
1616
[ -n "$${output}" ] && echo "$${output}" && export status=1; \
@@ -21,7 +21,7 @@ vet: main.go
2121
go vet $<
2222

2323
imports: main.go
24-
goimports -d $<
24+
go get golang.org/x/tools/cmd/goimports && goimports -d $<
2525

2626
test: lint vet imports
2727
GO111MODULE=on go test -v ./...

db/db.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ func (db *Database) ListAttributeKeys(resourceType string) (results []string, er
447447
return
448448
}
449449

450-
// Copied and adapted from github.com/hashicorp/terraform/command/jsonstate/state.go
451450
// DefaultVersion returns the detault VersionID for a given State path
451+
// Copied and adapted from github.com/hashicorp/terraform/command/jsonstate/state.go
452452
func (db *Database) DefaultVersion(path string) (version string, err error) {
453453
sqlQuery := "SELECT versions.version_id FROM" +
454454
" (SELECT states.path, max(states.serial) as mx FROM states GROUP BY states.path) t" +

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ require (
1818
github.com/sirupsen/logrus v1.2.0
1919
github.com/zclconf/go-cty v1.1.0 // indirect
2020
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 // indirect
21+
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
2122
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect
2223
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect
24+
golang.org/x/tools v0.0.0-20191025174333-e96d959c4788 // indirect
25+
gopkg.in/yaml.v2 v2.2.2
2326
)

0 commit comments

Comments
 (0)