2020-10-20 02:43:52 +02:00
|
|
|
SOURCES = $(shell find . -name "*.go")
|
|
|
|
|
|
|
|
default: build
|
|
|
|
|
|
|
|
build:
|
2020-11-26 16:02:43 +01:00
|
|
|
@go build ./...
|
2020-10-20 02:43:52 +02:00
|
|
|
|
|
|
|
check:
|
2020-11-26 16:02:43 +01:00
|
|
|
@go test -count 1 ./...
|
2020-10-20 02:43:52 +02:00
|
|
|
|
|
|
|
imports:
|
|
|
|
@goimports -w $(SOURCES)
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
@gofmt -w -s $(SOURCES)
|
|
|
|
|
|
|
|
.coverprofile: $(SOURCES)
|
2020-11-26 16:02:43 +01:00
|
|
|
@go test -count 1 -coverprofile .coverprofile
|
2020-10-20 02:43:52 +02:00
|
|
|
|
|
|
|
cover: .coverprofile
|
2020-11-26 16:02:43 +01:00
|
|
|
@go tool cover -func .coverprofile
|
2020-10-20 02:43:52 +02:00
|
|
|
|
|
|
|
showcover: .coverprofile
|
2020-11-26 16:02:43 +01:00
|
|
|
@go tool cover -html .coverprofile
|
|
|
|
|
|
|
|
check-fmt:
|
|
|
|
@! ( gofmt -s -l . | grep . )
|