Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 954 Bytes

golang.md

File metadata and controls

38 lines (30 loc) · 954 Bytes

Developer Notes

Set up:

cd $GOPATH
go get github.com/cunnie/bosh-esxi-cpi-release
 # ignore `no buildable Go source files` error
cd src/github.com/cunnie/bosh-esxi-cpi-release/src/esxi_cpi
 # get dependencies
go get ./...

Running:

go run esxi_cpi.go # "hello world"
go install
$GOPATH/bin/esxi_cpi "hello world"
go build -o esxi_cpi # BOSH CPI naming convention
./esxi_cpi

Ginkgo (copied from https://github.com/onsi/ginkgo):

cd $GOPATH/src/github.com/cunnie/bosh-esxi-cpi-release/src/esxi_cpi
# set GOPATH again because reasons
GOPATH=$GOPATH/src/github.com/cunnie/bosh-esxi-cpi-release/
go get github.com/onsi/ginkgo/ginkgo  # installs the ginkgo CLI
go get github.com/onsi/gomega         # fetches the matcher library
ginkgo bootstrap # set up a new ginkgo suite
ginkgo generate  # will create a sample test file.  edit this file and add your tests then...
go test # to run your tests
ginkgo  # also runs your tests