fix(lint): handle errcheck for strings.Builder.WriteString
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user