primeiro commit

This commit is contained in:
2026-02-12 15:28:20 -03:00
commit b264fb5c95
5 changed files with 216 additions and 0 deletions

39
Makefile Normal file
View File

@@ -0,0 +1,39 @@
APP := filedb
CMD := ./cmd/filedb
BUILD_DIR := bin
BIN := $(BUILD_DIR)/$(APP)
.PHONY: help build run install fmt tidy test clean
help:
@echo "Targets:"
@echo " make build Build binary to $(BIN)"
@echo " make run ARGS='...' Run CLI with optional ARGS"
@echo " make install Install CLI to GOPATH/bin"
@echo " make fmt Format Go code"
@echo " make tidy Tidy go modules"
@echo " make test Run tests"
@echo " make clean Remove build artifacts"
build:
@mkdir -p $(BUILD_DIR)
go build -o $(BIN) $(CMD)
run:
go run $(CMD) $(ARGS)
install:
go install $(CMD)
fmt:
gofmt -w $$(find . -type f -name '*.go' -not -path './vendor/*')
tidy:
go mod tidy
test:
go test ./...
clean:
rm -rf $(BUILD_DIR)