sources = $(shell find . -name "*.go")

default: build

lib: $(sources)
	go build

build: lib

check: $(sources) build
	go test -count 1

.cover: $(sources) build
	go test -count 1 -coverprofile .cover

cover: .cover
	go tool cover -func .cover

showcover: .cover
	go tool cover -html .cover

fmt: $(sources)
	go fmt

clean:
	go clean
	rm -f .cover
