refactor: 错误消息脱敏 + 后端 CI

- 新增 utils.InternalMsg:内部错误详情只进服务端日志,对外统一脱敏
  消息,不再向客户端泄露 GORM/SQL 实现细节;九个 controller 的
  err.Error() 出口全部切换
- 新增 .github/workflows/ci.yml:go build/vet/test(backend,go 1.25)
This commit is contained in:
Logan.Li committed 2026-11-01 02:03:26 +08:00
1 parent 1a47dee63d
commit e0cef06234
11 files changed
+92 -49

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
name: CI
on:
push:
branches: [main, master]
pull_request:
jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: Build
run: go build ./...
working-directory: backend
- name: Vet
run: go vet ./...
working-directory: backend
- name: Test
run: go test ./... -count=1 -coverprofile=coverage.out
working-directory: backend