Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 788 Bytes

golang.md

File metadata and controls

35 lines (26 loc) · 788 Bytes

golang

# download source
mkdir -p $GOPATH/src/github.com/edgelevel && cd $_
git clone git@github.com:edgelevel/lastpass-operator.git

# add dependencies
go get github.com/USER/DEP1 github.com/USER/DEP2
# example
go get github.com/spf13/cobra
go get github.com/codeskyblue/go-sh

# verify and update all dependencies
go get -u
go mod tidy

# init cli
cobra init . --pkg-name lastpass-operator

# run
go run main.go

# compile
go build $GOPATH/src/github.com/edgelevel/lastpass-operator

# compile and build executable
go install $GOPATH/src/github.com/edgelevel/lastpass-operator

# test
go test $GOPATH/src/github.com/edgelevel/lastpass-operator