Skip to content

refactor: replace interface{} with any across codebase - #3

Merged
wanglongan587 merged 1 commit into
ora-space:mainfrom
wanglongan587:main
Sep 9, 2026
Merged

refactor: replace interface{} with any across codebase#3
wanglongan587 merged 1 commit into
ora-space:mainfrom
wanglongan587:main

Conversation

@wanglongan587

Copy link
Copy Markdown
Collaborator

描述

根据现代 Go 规范(Go 1.18+),统一使用内置的 any 替换旧式的 interface{}

修改内容

  1. pkg/response/response.go:
    • Response.Data 字段类型由 interface{} 替换为 any
    • SuccessSuccessWithMessage 工具函数入参由 interface{} 替换为 any
  2. internal/repository/db.go:
    • GormZapLoggerInfoWarnError 方法中变长参数由 ...interface{} 替换为 ...any

质量门禁校验

  • task fmt (gofumpt + goimports 代码格式化)
  • task lint (golangci-lint 静态分析无报错)
  • task test (全量单元测试通过)
  • go build ./... (全工程编译通过)

@wanglongan587
wanglongan587 merged commit 6001fca into ora-space:main Sep 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant