You've already forked agentic-coding-workflow
chore: initialize repo skeleton with Makefile and lint config
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
APP_ENV=development
|
||||||
|
APP_HTTP_ADDR=:8080
|
||||||
|
APP_DATA_DIR=./data
|
||||||
|
|
||||||
|
# Postgres
|
||||||
|
APP_DB_DSN=postgres://acw:acw@localhost:5432/acw?sslmode=disable
|
||||||
|
|
||||||
|
# Encryption master key(32 字节 hex 编码 = 64 字符)
|
||||||
|
APP_MASTER_KEY=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
|
||||||
|
|
||||||
|
# 首次启动管理员账号种子
|
||||||
|
APP_BOOTSTRAP_ADMIN_EMAIL=admin@local
|
||||||
|
APP_BOOTSTRAP_ADMIN_PASSWORD=changeme
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
# Go
|
||||||
|
/bin/
|
||||||
|
/dist/
|
||||||
|
*.exe
|
||||||
|
coverage.out
|
||||||
|
coverage.html
|
||||||
|
|
||||||
|
# Env / secrets
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# Web
|
||||||
|
/web/node_modules/
|
||||||
|
/web/dist/
|
||||||
|
|
||||||
|
# Editor
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Local dev data
|
||||||
|
/data/
|
||||||
|
|
||||||
|
# Internal docs (specs / plans should never be committed)
|
||||||
|
/docs/superpowers/
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
run:
|
||||||
|
timeout: 5m
|
||||||
|
|
||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- errcheck
|
||||||
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
- staticcheck
|
||||||
|
- unused
|
||||||
|
- contextcheck
|
||||||
|
- revive
|
||||||
|
- gosec
|
||||||
|
- bodyclose
|
||||||
|
- rowserrcheck
|
||||||
|
- sqlclosecheck
|
||||||
|
|
||||||
|
issues:
|
||||||
|
exclude-rules:
|
||||||
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
|
- gosec
|
||||||
|
- errcheck
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
.PHONY: help dev build test test-unit lint sqlc migrate fmt clean
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "Targets: dev / build / test / test-unit / lint / sqlc / migrate / fmt / clean"
|
||||||
|
|
||||||
|
dev:
|
||||||
|
go run ./cmd/server
|
||||||
|
|
||||||
|
build:
|
||||||
|
cd web && pnpm install && pnpm build
|
||||||
|
go build -o bin/server ./cmd/server
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test -race -count=1 ./...
|
||||||
|
|
||||||
|
test-unit:
|
||||||
|
go test -race -count=1 -short ./...
|
||||||
|
|
||||||
|
lint:
|
||||||
|
golangci-lint run ./...
|
||||||
|
|
||||||
|
sqlc:
|
||||||
|
sqlc generate
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
go run ./cmd/server migrate up
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
gofmt -s -w .
|
||||||
|
cd web && pnpm format
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf bin dist web/dist coverage.out coverage.html
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
func main() {}
|
||||||
Reference in New Issue
Block a user