# lambdalog library targets
# see mercemay.top/src/lambdalog/
GO ?= go
GOFLAGS ?= -trimpath
LINT ?= golangci-lint
PKGS := ./...
.PHONY: all test test-race bench cover lint vendor tidy
all: test
test:
$(GO) test $(GOFLAGS) $(PKGS)
test-race:
$(GO) test $(GOFLAGS) -race $(PKGS)
bench:
$(GO) test $(GOFLAGS) -run=^$$ -bench=. -benchmem $(PKGS)
cover:
$(GO) test $(GOFLAGS) -covermode=atomic -coverprofile=coverage.out $(PKGS)
$(GO) tool cover -func=coverage.out | tail -n 1
lint:
$(LINT) run ./...
vendor:
$(GO) mod vendor
tidy:
$(GO) mod tidy