Add README.md and Makefile.

This commit is contained in:
2024-12-27 12:11:35 +02:00
parent b52df073e9
commit 90f6ecd024
3 changed files with 66 additions and 0 deletions

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
SHELL := /usr/local/bin/oksh
export PATH := $(PATH)
all: fmt lintfix test clean build
clean:
rm ./main
debug:
@echo "PATH: $(PATH)"
@echo "GOPATH: $(shell go env GOPATH)"
@which go
@which gofumpt
@which gci
@which golangci-lint
# Test
test:
go test ./...
# Format code
fmt:
gofumpt -l -w .
gci write .
# Run linter
lint: fmt
golangci-lint run
# Run linter and fix
lintfix: fmt
golangci-lint run --fix
build:
go build ./main.go