Initial commit

Basic project layout, some initial code
This commit is contained in:
2025-05-01 00:08:43 +02:00
commit d8092fc9d5
7 changed files with 186 additions and 0 deletions

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
BINARY_DIR = bin
BINARIES = $(patsubst cmd/%/,%,$(wildcard cmd/*/))
.PHONY: all build test validate clean run $(BINARIES)
all: build
build: $(BINARIES)
$(BINARY_DIR):
mkdir -p $(BINARY_DIR)
$(BINARIES): %: $(BINARY_DIR)
go build -o $(BINARY_DIR)/$@ ./cmd/$@/
test:
go test ./...
validate:
@test -z "$(shell gofmt -l .)" || (echo "Incorrect formatting in:"; gofmt -l .; exit 1)
go vet ./...
clean:
rm -rf $(BINARY_DIR)
go clean
run: $(LINKSERV)
$(LINKSERV)