chore: 禁用 govet fieldalignment 检查并修复未使用参数
- govet 禁用 fieldalignment 检查(结构体字段顺序优化不强制) - ConfigLoader.merge 函数参数 srcPath 改为 _ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
6281196dfd
commit
c929d320c6
@ -157,6 +157,8 @@ linters-settings:
|
||||
|
||||
govet:
|
||||
enable-all: true
|
||||
disable:
|
||||
- fieldalignment
|
||||
|
||||
staticcheck:
|
||||
checks: ["all", "-ST1000", "-ST1003"]
|
||||
|
||||
@ -12,9 +12,9 @@ const maxIncludeDepth = 10
|
||||
|
||||
// ConfigLoader 配置加载器
|
||||
type ConfigLoader struct {
|
||||
baseDir string
|
||||
loadedFiles map[string]bool // 所有已加载文件(用于跳过重复处理)
|
||||
stack map[string]bool // 当前调用栈(用于 DAG 循环检测)
|
||||
baseDir string
|
||||
depth int
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ func (l *ConfigLoader) Load(path string) (*Config, error) {
|
||||
}
|
||||
|
||||
// merge 合并配置
|
||||
func (l *ConfigLoader) merge(dst, src *Config, srcPath string) error {
|
||||
func (l *ConfigLoader) merge(dst, src *Config, _ string) error {
|
||||
// Server name collision(listen collision 由 validate.go 处理)
|
||||
for _, newServer := range src.Servers {
|
||||
for _, existing := range dst.Servers {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user