This commit is contained in:
oneao committed 2025-11-06 22:50:03 +08:00
1 parent d60be4a75b
commit be8eaae7c5
24 files changed
+595 -232

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
logs/
.idea/
@@ -60,6 +60,7 @@ func loginDefault(c *router.Context) error {
// 获取请求体并校验必填字段
bodyData, err := c.GetBodyWithRequired("account", "password")
if err != nil {
c.AddError(err)
return err
}
@@ -73,6 +74,7 @@ func loginDefault(c *router.Context) error {
)
user, err := db.FindOne("user_info", userQuery)
if err != nil {
c.AddError(err)
return response.Success(c).Message("查询用户失败,请稍后重试").Send()
}
@@ -124,7 +126,7 @@ func registerDefault(c *router.Context) error {
existingUsers, err := db.Find("user_info", accountQuery)
if err != nil {
return err
return c.AddError(err)
}
if len(existingUsers) > 0 {
@@ -141,7 +143,7 @@ func registerDefault(c *router.Context) error {
// 插入新用户
insertedRows, err := db.InsertOne("user_info", newUserData)
if err != nil {
return err
return c.AddError(err)
}
if insertedRows != 1 {
return response.Fail(c).Message("注册失败").Send()
@@ -1,21 +1,26 @@
package middleware
import (
"base-go-v2/internal/errs"
"base-go-v2/internal/logx"
"base-go-v2/internal/reponse"
"base-go-v2/internal/router"
"errors"
"runtime/debug"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
)
// 仅初始化一次的项目信息
var (
initOnce sync.Once
projectBase string // 例:base-farmework
projectAbsPrefix string // 例:/abs/path/to/base-farmework/
projectAbsPrefixLower string // 小写版,用于不区分大小写前缀比较(Windows 安全)
)
func ErrorMiddleware() router.HandlerFunc {
// 可扩展的业务错误类型列表
businessErrors := []interface{}{
(*errs.ValidationError)(nil),
// (*errs.BusinessError)(nil),
// (*errs.AuthError)(nil),
}
initOnce.Do(initProjectInfo)
return func(c *router.Context) error {
err := c.Next()
@@ -23,23 +28,132 @@ func ErrorMiddleware() router.HandlerFunc {
return nil
}
// 判断是否属于业务错误
for _, be := range businessErrors {
// be 是 nil 指针类型
if errors.As(err, &be) {
// 业务错误,不记录日志
return response.Fail(c).Message(err.Error()).Send()
}
errs := c.Errors()
if len(errs) == 0 {
return nil
}
// 系统错误,记录日志
stack := string(debug.Stack())
lastErr := errs[len(errs)-1]
stack := lastErr.StackTrace()
location := extractBusinessLocation(stack)
logx.Logger.Error("请求错误",
logx.String("path", string(c.RequestCtx.Path())),
logx.String("method", string(c.RequestCtx.Method())),
logx.String("location", location),
logx.String("error", err.Error()),
logx.String("stack", stack),
)
return response.Fail(c).Message("服务器内部错误").Send()
}
}
// 仅在注册时执行:确定 go.mod 根目录并缓存前缀
func initProjectInfo() {
// 以当前源文件为起点向上找 go.mod
_, file, _, _ := runtime.Caller(0)
if root, ok := findGoModRoot(file); ok {
projectBase = filepath.Base(root)
p := filepath.ToSlash(root)
if !strings.HasSuffix(p, "/") {
p += "/"
}
projectAbsPrefix = p
projectAbsPrefixLower = strings.ToLower(p)
}
}
// extractBusinessLocation:获取 AddError 后的业务 Handler 文件行(仅返回 <project>/<subpath>.go:<line>)
func extractBusinessLocation(stack string) string {
lines := strings.Split(stack, "\n")
foundAddError := false
countGo := 0
for _, raw := range lines {
line := strings.TrimSpace(raw)
if strings.Contains(line, "AddError") {
foundAddError = true
continue
}
if !foundAddError {
continue
}
if strings.Contains(line, ".go:") {
countGo++
if countGo == 2 {
// 去掉 " +0x..." 偏移
if i := strings.Index(line, " +"); i != -1 {
line = line[:i]
}
return trimToProject(line)
}
}
}
return ""
}
// 将绝对路径裁剪为 "<project>/<subpath>.go:<line>"
func trimToProject(goLine string) string {
// 统一斜杠
line := strings.ReplaceAll(goLine, "\\", "/")
// 用最后一个冒号分离(避免 Windows 盘符)
idx := strings.LastIndex(line, ":")
if idx == -1 || idx+1 >= len(line) {
return line
}
filePath, lineNo := line[:idx], line[idx+1:]
// 优先:前缀裁剪(O(1)),比 filepath.Rel 更快
if projectAbsPrefix != "" {
fp := filepath.ToSlash(filePath)
fpl := strings.ToLower(fp)
if strings.HasPrefix(fpl, projectAbsPrefixLower) {
rel := fp[len(projectAbsPrefix):]
return projectBase + "/" + rel + ":" + lineNo
}
}
// 其次:internal/cmd/pkg 作为锚点
segs := strings.Split(filePath, "/")
for i, s := range segs {
if s == "internal" || s == "cmd" || s == "pkg" {
if i > 0 {
return strings.Join(segs[i-1:], "/") + ":" + lineNo
}
}
}
// 启发式:目录名包含 '-' 或 '_',当作仓库名
for i, s := range segs {
if strings.ContainsAny(s, "-_") {
return strings.Join(segs[i:], "/") + ":" + lineNo
}
}
// 兜底:末尾 4 级
start := len(segs) - 4
if start < 0 {
start = 0
}
return strings.Join(segs[start:], "/") + ":" + lineNo
}
// 从给定文件路径向上查找包含 go.mod 的目录(仅注册时调用一次)
func findGoModRoot(filePath string) (string, bool) {
dir := filepath.Clean(filepath.Dir(filepath.FromSlash(filePath)))
for {
if _, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil {
return dir, true
}
parent := filepath.Dir(dir)
if parent == dir {
return "", false
}
dir = parent
}
}
@@ -60,7 +60,7 @@ func Find(table string, conditions map[string]interface{}, orderBy ...string) ([
query := fmt.Sprintf("SELECT * FROM %s WHERE %s", table, strings.Join(whereParts, " AND "))
order := "b_id DESC"
order := "id DESC"
if len(orderBy) > 0 && orderBy[0] != "" {
order = orderBy[0]
}
@@ -79,7 +79,7 @@ func Find(table string, conditions map[string]interface{}, orderBy ...string) ([
func FindAll(table string, orderBy ...string) ([]mapx.M, error) {
query := fmt.Sprintf("SELECT * FROM %s", table)
order := "b_id DESC"
order := "id DESC"
if len(orderBy) > 0 && orderBy[0] != "" {
order = orderBy[0]
}
@@ -111,11 +111,11 @@ func FindOne(table string, conditions map[string]interface{}, orderBy ...string)
query := fmt.Sprintf("SELECT * FROM %s WHERE %s", table, strings.Join(whereParts, " AND "))
order := "b_id DESC"
order := "id DESC"
if len(orderBy) > 0 && orderBy[0] != "" {
order = orderBy[0]
}
query += " ORDER BY " + order + " LIMIT 1" // 只取一条记录
query += " ORDER BY " + order + " LIMIT 1"
row := mapx.New()
err := DB.Get(&row, query, values...)
@@ -0,0 +1,42 @@
package errs
import (
"errors"
"runtime/debug"
)
// StackError 保存原始错误和堆栈
type StackError struct {
err error
stack string
}
// 实现 error 接口
func (s *StackError) Error() string {
if s.err == nil {
return ""
}
return s.err.Error()
}
// StackTrace 返回堆栈信息
func (s *StackError) StackTrace() string {
return s.stack
}
// WrapWithStack 给错误附加堆栈,如果已经是 StackError 则直接返回
func WrapWithStack(err error) *StackError {
if err == nil {
return nil
}
var se *StackError
if errors.As(err, &se) {
return se
}
return &StackError{
err: err,
stack: string(debug.Stack()),
}
}
@@ -1,6 +1,7 @@
package router
import (
"base-go-v2/internal/errs"
"base-go-v2/internal/utils/mapx"
"base-go-v2/internal/utils/validate"
"encoding/json"
@@ -154,3 +155,35 @@ func (c *Context) Text(statusCode int, msg string) error {
c.Abort()
return nil
}
// AddError 记录错误,自动包装 StackError
func (c *Context) AddError(err error) error {
if err == nil {
return nil
}
if c.keys == nil {
c.keys = make(map[string]interface{})
}
if _, exists := c.keys["errors"]; !exists {
c.keys["errors"] = []*errs.StackError{}
}
// 统一生成堆栈
se := errs.WrapWithStack(err)
c.keys["errors"] = append(c.keys["errors"].([]*errs.StackError), se)
return err
}
// Errors 返回 []*utils.StackError
func (c *Context) Errors() []*errs.StackError {
if c.keys == nil {
return nil
}
if err, exists := c.keys["errors"]; exists {
return err.([]*errs.StackError)
}
return nil
}
@@ -74,6 +74,7 @@ type middlewareEntry struct {
// 判断路径是否被排除
func (m *middlewareEntry) IsExcluded(path string) bool {
path = strings.TrimSuffix(path, "/") // 去掉尾部斜杠
if m.excludePaths != nil {
if _, ok := m.excludePaths[path]; ok {
return true
@@ -123,23 +124,36 @@ func (r *Router) Use(handler HandlerFunc) *MiddlewareHandle {
}
// ExcludePaths 支持 /** 前缀匹配
func (mh *MiddlewareHandle) ExcludePaths(paths ...string) *Router {
excludeMap := make(map[string]struct{}, 0)
// ExcludePaths 支持 /** 前缀匹配,并自动带上 basePath
func (mh *MiddlewareHandle) ExcludePaths(paths ...string) *MiddlewareHandle {
excludeMap := make(map[string]struct{})
excludePrefix := make([]string, 0)
basePath := strings.TrimSuffix(mh.router.basePath, "/") // 去掉尾部斜杠
for _, p := range paths {
if strings.HasSuffix(p, "/**") {
base := strings.TrimSuffix(p, "/**")
fullPath := p
if !strings.HasPrefix(p, "/") {
fullPath = "/" + p
}
// 自动加上 basePath
if basePath != "/" {
fullPath = basePath + fullPath
}
if strings.HasSuffix(fullPath, "/**") {
base := strings.TrimSuffix(fullPath, "/**")
excludePrefix = append(excludePrefix, base)
} else {
excludeMap[p] = struct{}{}
excludeMap[fullPath] = struct{}{}
}
}
mh.router.middleware[mh.entryIdx].excludePaths = excludeMap
mh.router.middleware[mh.entryIdx].excludePrefix = excludePrefix
return mh.router
return mh
}
// Group 创建子路由组
@@ -0,0 +1,13 @@
{"level":"ERROR","ts":"2025-11-06 21:42:52.519","caller":"middleware/error.go:27","msg":"请求错误","path":"/app/auth/register/default","method":"POST","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 19 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc00009e080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:26 +0x11e\nbase-go-v2/internal/router.(*Context).Next(0x7ff6a1fa517d?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc00009e080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc00009c060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc00009e080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc00023a0a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0000b0000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000236150, 0xc00009c008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc00023e008, {0x7ff6a204ca18, 0xc000230058})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000240000, 0xc00020e220)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377090463208833024"}
{"level":"ERROR","ts":"2025-11-06 21:47:35.525","caller":"middleware/error.go:39","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"base-go-v2/internal/api/middleware/error.go:36 +0x105","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api/middleware.ErrorMiddleware.func1(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:36 +0x105\nbase-go-v2/internal/router.(*Context).Next(0x7ff77ad45207?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000096060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0000ae000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc000096008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff77adecd58, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fc80)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377091650259779584"}
{"level":"ERROR","ts":"2025-11-06 21:52:48.952","caller":"middleware/error.go:34","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 19 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000216080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:31 +0xf4\nbase-go-v2/internal/router.(*Context).Next(0x7ff72ce451fd?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000216080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000214060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000216080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000ba0a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc000228000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc0000b6150, 0xc000214008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000be008, {0x7ff72ceecb38, 0xc0000b0058})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000c0000, 0xc000096220)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377092964821762048"}
{"level":"ERROR","ts":"2025-11-06 22:07:55.689","caller":"middleware/error.go:28","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:15","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 24 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000196080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:33 +0x336\nbase-go-v2/internal/router.(*Context).Next(0x7ff646b952a4?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000196080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000194060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000196080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000f45a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0001a8000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000137bc0, 0xc000194008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:240 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000ef208, {0x7ff646c3caf8, 0xc00008c248})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000ec240, 0xc00008fc60)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377096765834264576"}
{"level":"ERROR","ts":"2025-11-06 22:09:24.117","caller":"middleware/error.go:30","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:15","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:35 +0x376\nbase-go-v2/internal/router.(*Context).Next(0x7ff7230552a4?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000096060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0000ae000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc000096008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:240 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff7230fcb18, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fc80)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377097137785143296"}
{"level":"ERROR","ts":"2025-11-06 22:10:00.635","caller":"middleware/error.go:26","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/devtool/golang/go/src/runtime/debug/stack.go:26","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 24 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000030100)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:20 +0x45\nbase-go-v2/internal/router.(*Context).Next(0x7ff6c96052a1?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000030100)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000204060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000030100)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000f45a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc00006e020?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000137bc0, 0xc000204008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:240 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000ef208, {0x7ff6c96acbd8, 0xc00008c248})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000ec240, 0xc00008fc60)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377097292072615936"}
{"level":"ERROR","ts":"2025-11-06 22:11:11.156","caller":"middleware/error.go:30","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/workspace/code/base-project/base-go-v2/internal/router/context.go:43","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000031400)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:29 +0xd0\nbase-go-v2/internal/router.(*Context).Next(0x7ff752f352a4?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000031400)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000164c60?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000031400)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc00006fca0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc000164c08)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:242 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff752fdcb18, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fc80)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377097587859128320"}
{"level":"ERROR","ts":"2025-11-06 22:11:38.477","caller":"middleware/error.go:30","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/workspace/code/base-project/base-go-v2/internal/router/router.go:196","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 34 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:29 +0xd0\nbase-go-v2/internal/router.(*Context).Next(0x7ff6e99752a4?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000110c60?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000f45a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc00008fc40?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000137bc0, 0xc000110c08)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:242 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000ef208, {0x7ff6e9a1cb18, 0xc000194000})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000ec240, 0xc000190020)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377097702418153472"}
{"level":"ERROR","ts":"2025-11-06 22:12:17.735","caller":"middleware/error.go:30","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"D:/workspace/code/base-project/base-go-v2/internal/router/router.go:182","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/api.InitAppRouter.ErrorMiddleware.func4(0xc000210080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:29 +0xd0\nbase-go-v2/internal/router.(*Context).Next(0x7ff7854f52e4?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000210080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc00020e060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000210080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc000226000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:43\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc00020e008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:246 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff78559cb58, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fce0)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377097867082334208"}
{"level":"ERROR","ts":"2025-11-06 22:35:16.172","caller":"middleware/error.go:40","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"base-go-v2/internal/router/router.go:194","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 34 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/errs.WrapWithStack({0x7ff701e980c0, 0xc00008a230})\n\tD:/workspace/code/base-project/base-go-v2/internal/errs/error.go:40 +0x6d\nbase-go-v2/internal/router.(*Context).AddError(0xc0000a4280, {0x7ff701e980c0, 0xc00008a230})\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:174 +0x10d\nbase-go-v2/internal/router.(*Router).handle.func1(0xc0000a4280)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:194 +0x3f\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/api/middleware.ErrorMiddleware.func1(0xc0000a4280)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:26 +0x54\nbase-go-v2/internal/router.(*Context).Next(0x7ff701df64ef?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc0000a4280)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc0000cc060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc0000a4280)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000ba0a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc000096200?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/router.(*Router).Handler(0xc0000b6150, 0xc0000cc008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:238 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000c6008, {0x7ff701e9e018, 0xc000214000})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000c8000, 0xc000210020)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377103648687128576"}
{"level":"ERROR","ts":"2025-11-06 22:37:11.091","caller":"middleware/error.go:40","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"base-go-v2/internal/api/auth/index.go:24","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 5 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/errs.WrapWithStack({0x7ff6b9c380e0, 0xc0000a1bb0})\n\tD:/workspace/code/base-project/base-go-v2/internal/errs/error.go:40 +0x6d\nbase-go-v2/internal/router.(*Context).AddError(0xc0000f3380, {0x7ff6b9c380e0, 0xc0000a1bb0})\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:174 +0x10d\nbase-go-v2/internal/api/auth.InitAuthRouter.WrapHandler.func1(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/auth/index.go:24 +0x3f\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/api/middleware.ErrorMiddleware.func1(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:26 +0x54\nbase-go-v2/internal/router.(*Context).Next(0x7ff6b9b964ef?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000110c60?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc0000f3380)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0000f45a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc00008fc40?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/router.(*Router).Handler(0xc000137bc0, 0xc000110c08)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000ef208, {0x7ff6b9c3e038, 0xc00006a008})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0000ec240, 0xc00006e040)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377104130746875904"}
{"level":"ERROR","ts":"2025-11-06 22:38:45.572","caller":"middleware/error.go:40","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"base-go-v2/internal/api/auth/index.go:129","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/errs.WrapWithStack({0x7ff68a658060, 0xc00008a0e0})\n\tD:/workspace/code/base-project/base-go-v2/internal/errs/error.go:40 +0x6d\nbase-go-v2/internal/router.(*Context).AddError(0xc000098080, {0x7ff68a658060, 0xc00008a0e0})\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:174 +0x10d\nbase-go-v2/internal/api/auth.registerDefault(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/auth/index.go:129 +0x50b\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/api/middleware.ErrorMiddleware.func1(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:26 +0x54\nbase-go-v2/internal/router.(*Context).Next(0x7ff68a5b642f?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000096060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0000ae000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc000096008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff68a65dfb8, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fc80)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377104519802126336"}
{"level":"ERROR","ts":"2025-11-06 22:48:38.411","caller":"middleware/error.go:40","msg":"请求错误","path":"/app/auth/register/default","method":"POST","location":"base-go-v2/internal/api/auth/index.go:129","error":"non-struct dest type map with >1 columns (10)","stack":"goroutine 11 [running]:\nruntime/debug.Stack()\n\tD:/devtool/golang/go/src/runtime/debug/stack.go:26 +0x5e\nbase-go-v2/internal/errs.WrapWithStack({0x7ff7f1e68020, 0xc00008a0e0})\n\tD:/workspace/code/base-project/base-go-v2/internal/errs/error.go:40 +0x6d\nbase-go-v2/internal/router.(*Context).AddError(0xc000098080, {0x7ff7f1e68020, 0xc00008a0e0})\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:174 +0x10d\nbase-go-v2/internal/api/auth.registerDefault(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/auth/index.go:129 +0x505\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/api/middleware.ErrorMiddleware.func1(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/error.go:26 +0x54\nbase-go-v2/internal/router.(*Context).Next(0x7ff7f1dc642f?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.LoggerMiddleware.func3(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/logger.go:27 +0x77\nbase-go-v2/internal/router.(*Context).Next(0xc000096060?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.CORSMiddleware.func2(0xc000098080)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/cors.go:22 +0x159\nbase-go-v2/internal/router.(*Context).Next(0xc0001465a0?)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44 +0x35\nbase-go-v2/internal/api.InitAppRouter.RecoveryMiddleware.func1(0xc0000ae000?)\n\tD:/workspace/code/base-project/base-go-v2/internal/api/middleware/recovery.go:29 +0x45\nbase-go-v2/internal/router.(*Context).Next(...)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/context.go:44\nbase-go-v2/internal/router.(*Router).Handler(0xc000177bf0, 0xc000096008)\n\tD:/workspace/code/base-project/base-go-v2/internal/router/router.go:228 +0x40e\ngithub.com/valyala/fasthttp.(*Server).serveConn(0xc000143208, {0x7ff7f1e6df78, 0xc00006a250})\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/server.go:2465 +0x124b\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000140240, 0xc00006fc80)\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:225 +0x92\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1()\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:197 +0x32\ncreated by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1\n\tD:/devtool/golang/gopath/pkg/mod/github.com/valyala/fasthttp@v1.68.0/workerpool.go:196 +0x194\n","trackId":"377107013567512576"}
@@ -33,3 +33,12 @@
{"level":"INFO","ts":"2025-11-05 21:38:25.864","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0.0005154,"trackId":"376726957276004352"}
{"level":"INFO","ts":"2025-11-05 21:38:26.084","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0.0002596,"trackId":"376726958202945536"}
{"level":"INFO","ts":"2025-11-05 21:38:26.319","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376726959188606976"}
{"level":"INFO","ts":"2025-11-05 21:39:35.357","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0.0001412,"trackId":"376727248754966528"}
{"level":"INFO","ts":"2025-11-05 21:42:15.102","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376727918774059008"}
{"level":"INFO","ts":"2025-11-05 21:42:24.954","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0.000409,"trackId":"376727960096342016"}
{"level":"INFO","ts":"2025-11-05 21:42:43.505","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376728037904875520"}
{"level":"INFO","ts":"2025-11-05 21:52:23.602","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376730471008043008"}
{"level":"INFO","ts":"2025-11-05 22:03:21.901","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376733232114171904"}
{"level":"INFO","ts":"2025-11-05 22:03:35.322","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376733288405925888"}
{"level":"INFO","ts":"2025-11-05 22:04:01.873","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376733399768891392"}
{"level":"INFO","ts":"2025-11-05 22:10:50.807","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/login/default","method":"POST","ip":"192.168.5.3","elapsed":0,"trackId":"376735114962403328"}
@@ -67,3 +67,28 @@
{"level":"INFO","ts":"2025-11-06 14:25:49.654","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/test","method":"POST","ip":"192.168.1.136","elapsed":0.0009762,"trackId":"376980476906176512"}
{"level":"INFO","ts":"2025-11-06 14:26:01.687","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/test","method":"POST","ip":"192.168.1.136","elapsed":0,"trackId":"376980527380430848"}
{"level":"INFO","ts":"2025-11-06 16:01:53.899","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/test","method":"POST","ip":"192.168.1.136","elapsed":0.0009752,"trackId":"377004653902036992"}
{"level":"INFO","ts":"2025-11-06 21:16:41.715","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0067722,"trackId":"377083875114876928"}
{"level":"INFO","ts":"2025-11-06 21:17:52.883","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0,"trackId":"377084173648658432"}
{"level":"INFO","ts":"2025-11-06 21:18:54.267","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0,"trackId":"377084431111815168"}
{"level":"INFO","ts":"2025-11-06 21:19:53.098","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0005261,"trackId":"377084677862719488"}
{"level":"INFO","ts":"2025-11-06 21:23:00.479","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0,"trackId":"377085463799791616"}
{"level":"INFO","ts":"2025-11-06 21:31:03.146","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0,"trackId":"377087488251920384"}
{"level":"INFO","ts":"2025-11-06 21:32:16.093","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.1880208,"trackId":"377087793425285120"}
{"level":"INFO","ts":"2025-11-06 21:36:42.337","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0919709,"trackId":"377088910536212480"}
{"level":"INFO","ts":"2025-11-06 21:39:31.387","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0831313,"trackId":"377089619621052416"}
{"level":"INFO","ts":"2025-11-06 21:42:20.054","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.077842,"trackId":"377090327082696704"}
{"level":"INFO","ts":"2025-11-06 21:42:34.452","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0774994,"trackId":"377090387472285696"}
{"level":"INFO","ts":"2025-11-06 21:42:48.021","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0763234,"trackId":"377090444393185280"}
{"level":"INFO","ts":"2025-11-06 21:42:52.519","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0885687,"trackId":"377090463208833024"}
{"level":"INFO","ts":"2025-11-06 21:47:35.525","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0789829,"trackId":"377091650259779584"}
{"level":"INFO","ts":"2025-11-06 21:52:48.953","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0901211,"trackId":"377092964821762048"}
{"level":"INFO","ts":"2025-11-06 22:07:55.689","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.5955457,"trackId":"377096765834264576"}
{"level":"INFO","ts":"2025-11-06 22:09:24.117","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.3433544,"trackId":"377097137785143296"}
{"level":"INFO","ts":"2025-11-06 22:10:00.635","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.075988,"trackId":"377097292072615936"}
{"level":"INFO","ts":"2025-11-06 22:11:11.156","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0763772,"trackId":"377097587859128320"}
{"level":"INFO","ts":"2025-11-06 22:11:38.477","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0844654,"trackId":"377097702418153472"}
{"level":"INFO","ts":"2025-11-06 22:12:17.736","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0836953,"trackId":"377097867082334208"}
{"level":"INFO","ts":"2025-11-06 22:35:16.172","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0778315,"trackId":"377103648687128576"}
{"level":"INFO","ts":"2025-11-06 22:37:11.091","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0653962,"trackId":"377104130746875904"}
{"level":"INFO","ts":"2025-11-06 22:38:45.572","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":1.7876704,"trackId":"377104519802126336"}
{"level":"INFO","ts":"2025-11-06 22:48:38.411","caller":"middleware/logger.go:34","msg":"接口请求","path":"/app/auth/register/default","method":"POST","ip":"192.168.5.6","elapsed":0.0668153,"trackId":"377107013567512576"}