2024-03-19 17:55:57 -07:00
|
|
|
MAIN_PACKAGE_PATH := .
|
|
|
|
TARGET_DIR := .
|
|
|
|
TARGET := asdf
|
|
|
|
|
|
|
|
# Not sure what the default location should be for builds
|
|
|
|
build: test lint
|
|
|
|
go build -o=${TARGET_DIR}/${TARGET} ${MAIN_PACKAGE_PATH}
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
go fmt ./...
|
|
|
|
|
|
|
|
verify:
|
|
|
|
go mod verify
|
|
|
|
|
|
|
|
tidy:
|
|
|
|
go mod tidy -v
|
|
|
|
|
|
|
|
audit: verify vet test
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test -coverprofile=/tmp/coverage.out -bench= -v -race ./...
|
|
|
|
|
|
|
|
cover: test
|
|
|
|
go tool cover -html=/tmp/coverage.out
|
|
|
|
|
|
|
|
lint: fmt
|
|
|
|
staticcheck -tests -show-ignored ./...
|
2024-03-20 18:05:03 -07:00
|
|
|
revive ./...
|
2024-03-19 17:55:57 -07:00
|
|
|
|
|
|
|
vet: fmt
|
|
|
|
go vet .
|
|
|
|
|
|
|
|
run: build
|
|
|
|
${TARGET_DIR}/${TARGET}
|
|
|
|
|
|
|
|
.PHONY: fmt lint vet build test run
|