Skip to content

Commit

Permalink
fix: make test fails due to golint changes!
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresCidoncha committed Oct 25, 2019
1 parent cccf080 commit 3f11e99
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 115 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -10,7 +10,7 @@ terraboard: main.go $(DEPS)
strip $@

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

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

test: lint vet imports
GO111MODULE=on go test -v ./...
Expand Down
2 changes: 1 addition & 1 deletion db/db.go
Expand Up @@ -447,8 +447,8 @@ func (db *Database) ListAttributeKeys(resourceType string) (results []string, er
return
}

// Copied and adapted from github.com/hashicorp/terraform/command/jsonstate/state.go
// DefaultVersion returns the detault VersionID for a given State path
// Copied and adapted from github.com/hashicorp/terraform/command/jsonstate/state.go
func (db *Database) DefaultVersion(path string) (version string, err error) {
sqlQuery := "SELECT versions.version_id FROM" +
" (SELECT states.path, max(states.serial) as mx FROM states GROUP BY states.path) t" +
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Expand Up @@ -18,6 +18,9 @@ require (
github.com/sirupsen/logrus v1.2.0
github.com/zclconf/go-cty v1.1.0 // indirect
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect
golang.org/x/tools v0.0.0-20191025174333-e96d959c4788 // indirect
gopkg.in/yaml.v2 v2.2.2
)

0 comments on commit 3f11e99

Please sign in to comment.