service.xpcool.com/.gitignore
夏犀麟 9010592c9e fix(build): 修正 .gitignore 的 log/ 规则误伤源码包,恢复 HEAD 可编译
问题:.gitignore 第 27 行的 `log/` 未锚定根目录,会匹配任意层级的
log 目录,把下面 4 个**源码包**一并忽略:
  - api/admin/base/log
  - api/admin/system/log
  - internal/service/admin/base/log
  - internal/service/admin/system/log

而引用它们的 internal/controller/admin/log.go 已在库中,于是
「已提交的代码 import 了不存在(未提交)的包」——干净检出后
`go build .` 直接失败:
  no required module provides package service.xpcool.com/api/admin/base/log

因为 service 仓库没有 CI 自动构建,这个问题一直没有暴露,
影响是:新克隆/新设备无法编译,任何干净检出构建都会失败。

修复:
1. 规则改为 `/log/`,只忽略仓库根目录下的运行日志输出目录
   (config.dev.yaml 的 logger.path: "log"),不再误伤同名源码包;
2. 补交被忽略期间漏掉的 4 个 log 包,恢复 HEAD 完整可编译。
2026-09-14 02:34:46 +08:00

46 lines
1.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.buildpath
.hgignore.swp
.project
.orig
.swp
.idea/
.settings/
.vscode/
bin/
**/.DS_Store
gf
main
main.exe
output/
manifest/output/
temp/
temp.yaml
bin
**/config/config.yaml
# WorkBuddy 本地记忆仅放行变更记录CHANGELOG.md其余本地数据不入库
.workbuddy/*
!.workbuddy/memory/
.workbuddy/memory/*
!.workbuddy/memory/CHANGELOG.md
# server runtime logs
# 注意必须锚定到仓库根目录:写成 `log/` 会匹配任意层级的 log 目录,
# 把 api/admin/**/loginternal/service/admin/**/log 这些**源码包**一并忽略
# 导致它们被静默漏提交引用方 controller 已入库 HEAD 编译不过
/log/
# 本地环境变量含数据库口令禁止提交
.env*
# 运行时数据目录含自动生成的 RSA 登录加密私钥禁止提交
data/
# GoLand 项目级运行配置含数据库口令禁止提交
.run/
service_test.exe
service_test2*
# 招聘爬虫本地离线验证产物rc_*验证脚本编译出的二进制 + 运行日志不入库
rc_*.log
rc_verify*