mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-17 10:14:23 +00:00
chore: upgrade Go 1.25 → 1.26 and apply go fix modernizations
- Update go.mod and Dockerfile to Go 1.26 - Apply `go fix ./...` stdlib modernizations across 170+ files - Add `go fix` to post-implementation checklist in CLAUDE.md - Fix go fix misapplied rewrite in loop_history.go
This commit is contained in:
1 parent
e593b9cf22
commit
bdb60de7ae
178 files changed
+1475
-1541
No files matched your search
@@ -100,12 +100,12 @@ func parseMessageContent(rawContent, messageType string) string {
|
||||
}
|
||||
|
||||
func parsePostContent(rawContent string) string {
|
||||
var post map[string]interface{}
|
||||
var post map[string]any
|
||||
if err := json.Unmarshal([]byte(rawContent), &post); err != nil {
|
||||
return rawContent
|
||||
}
|
||||
|
||||
var langContent interface{}
|
||||
var langContent any
|
||||
for _, lang := range []string{"zh_cn", "en_us"} {
|
||||
if lc, ok := post[lang]; ok {
|
||||
langContent = lc
|
||||
@@ -122,25 +122,25 @@ func parsePostContent(rawContent string) string {
|
||||
return rawContent
|
||||
}
|
||||
|
||||
langMap, ok := langContent.(map[string]interface{})
|
||||
langMap, ok := langContent.(map[string]any)
|
||||
if !ok {
|
||||
return rawContent
|
||||
}
|
||||
|
||||
contentArr, ok := langMap["content"].([]interface{})
|
||||
contentArr, ok := langMap["content"].([]any)
|
||||
if !ok {
|
||||
return rawContent
|
||||
}
|
||||
|
||||
var textParts []string
|
||||
for _, para := range contentArr {
|
||||
paraArr, ok := para.([]interface{})
|
||||
paraArr, ok := para.([]any)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
var lineParts []string
|
||||
for _, elem := range paraArr {
|
||||
elemMap, ok := elem.(map[string]interface{})
|
||||
elemMap, ok := elem.(map[string]any)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user