github.com/awslabs/clencli@v0.0.0-20210514234156-7ecf17182a20/lib/make/go/Makefile (about) 1 .PHONY: go/build 2 go/build: ## Compile packages and dependencies 3 mkdir -p build 4 go build -o build/clencli 5 rm -rf build 6 7 .PHONY: go/install 8 go/install: ## Compile and install packages and dependencies 9 go install 10 11 .PHONY: go/run 12 go/run: ## Compile and run Go program 13 ifdef command 14 go run main.go $(command) 15 else 16 go run main.go 17 endif 18 19 .PHONY: go/fmt 20 go/fmt: ## gofmt (reformat) package sources 21 go fmt github.com/awslabs/clencli/... 22 go fmt ./... 23 gofmt -s -w . 24 25 .PHONY: go/generate 26 go/generate: ## Generate Go files by processing source 27 go generate ./... 28 29 .PHONY: go/mod/tidy 30 go/mod/tidy: ## Add missing and remove unused modules 31 go mod tidy 32 33 .PHONY: go/get 34 go/get: ## Add dependencies to current module and install them 35 go get ./... 36 37 .PHONY: go/get/debug 38 go/get/debug: 39 GOPROXY=direct go get -x ./... 40 41 .PHONY: go/clean 42 go/clean: ## Remove object files and cached files 43 go clean -cache -modcache -i -r 44 45 .PHONY: go/list 46 go/list: ## List packages or modules 47 go list -m -versions $(package) 48 49 .PHONY: go/version 50 go/version: ## Print Go version 51 go version 52 53 .PHONY: go/env 54 go/env: ## Print Go environment information 55 go env