fix(lint): handle errcheck for strings.Builder.WriteString

This commit is contained in:
erio
2026-02-07 18:18:15 +08:00
parent 36e6fb5fc8
commit e3748da860

View File

@@ -495,14 +495,14 @@ func (s *GatewayService) GenerateSessionHash(parsed *ParsedRequest) string {
if parsed.System != nil { if parsed.System != nil {
systemText := s.extractTextFromSystem(parsed.System) systemText := s.extractTextFromSystem(parsed.System)
if systemText != "" { if systemText != "" {
combined.WriteString(systemText) _, _ = combined.WriteString(systemText)
} }
} }
for _, msg := range parsed.Messages { for _, msg := range parsed.Messages {
if m, ok := msg.(map[string]any); ok { if m, ok := msg.(map[string]any); ok {
msgText := s.extractTextFromContent(m["content"]) msgText := s.extractTextFromContent(m["content"])
if msgText != "" { if msgText != "" {
combined.WriteString(msgText) _, _ = combined.WriteString(msgText)
} }
} }
} }