Hello,
While I mentioned problems building the provisioner in another issue, I figured it may be good to create a separate one and document it. I'm wondering what the proper steps are, considering that the usual 'go get' fails to find hcldec:
~ # go version
go version go1.13.7 linux/amd64
~ # go get github.com/YaleUniversity/packer-provisioner-goss
package github.com/hashicorp/hcl/v2/hcldec: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
/usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)
~ # go build github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss/packer-provisioner-goss.go:12:2: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
/usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)
go build $GOPATH/src/github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss/packer-provisioner-goss.go:12:2: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
/usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)
However, the build executes if go is executed inside the source dir:
~ # cd $GOPATH/src/github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss # go build
go: downloading github.com/hashicorp/packer v1.5.1
go: downloading github.com/hashicorp/hcl v1.0.0
[...]
Hello, While I mentioned problems building the provisioner in another issue, I figured it may be good to create a separate one and document it. I'm wondering what the proper steps are, considering that the usual 'go get' fails to find hcldec:
However, the build executes if go is executed inside the source dir:
Am I missing something obvious? Thanks!