github.com/hamba/timex@v1.2.1-0.20240304044353-56d3de3a9ed9/Makefile (about) 1 # Format all files 2 fmt: 3 @echo "==> Formatting source" 4 @gofmt -s -w $(shell find . -type f -name '*.go' -not -path "./vendor/*") 5 @echo "==> Done" 6 .PHONY: fmt 7 8 # Tidy the go.mod file 9 tidy: 10 @echo "==> Cleaning go.mod" 11 @go mod tidy 12 @echo "==> Done" 13 .PHONY: tidy 14 15 # Run all tests 16 test: 17 @go test -cover -race ./... 18 .PHONY: test 19 20 # Lint the project 21 lint: 22 @golangci-lint run ./... 23 .PHONY: lint 24 25 # Run benchmarks 26 bench: 27 @go test -bench . ./... 28 .PHONY: bench