fix(lint): 修复 golangci-lint 检查问题
- 格式化代码(gofmt) - 修复空指针检查(staticcheck) - 删除未使用的函数(unused)
This commit is contained in:
@@ -612,11 +612,3 @@ func sanitizeErrorBodyForStorage(raw string, maxBytes int) (sanitized string, tr
|
||||
return raw, false
|
||||
}
|
||||
|
||||
func extractString(v any, key string) string {
|
||||
root, ok := v.(map[string]any)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
s, _ := root[key].(string)
|
||||
return strings.TrimSpace(s)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user