From 9f3caa3d6c99cfca183c65390bdd9cd9de85fae6 Mon Sep 17 00:00:00 2001 From: Amir Mamaghani Date: Thu, 5 Mar 2026 11:54:16 +0100 Subject: [PATCH] fix: resolve golangci-lint formatting issues Fix gci import ordering in telegram and anthropic provider, and break long function signature in openai_compat provider to satisfy golines. --- pkg/channels/telegram/telegram.go | 2 +- pkg/providers/anthropic/provider.go | 1 + pkg/providers/openai_compat/provider.go | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/channels/telegram/telegram.go b/pkg/channels/telegram/telegram.go index 4daace52a..fcd068e6f 100644 --- a/pkg/channels/telegram/telegram.go +++ b/pkg/channels/telegram/telegram.go @@ -3,12 +3,12 @@ package telegram import ( "context" "fmt" + "math/rand" "net/http" "net/url" "os" "regexp" "slices" - "math/rand" "strconv" "strings" "sync" diff --git a/pkg/providers/anthropic/provider.go b/pkg/providers/anthropic/provider.go index bb89cb3f9..1b250b9b4 100644 --- a/pkg/providers/anthropic/provider.go +++ b/pkg/providers/anthropic/provider.go @@ -9,6 +9,7 @@ import ( "github.com/anthropics/anthropic-sdk-go" "github.com/anthropics/anthropic-sdk-go/option" + "github.com/sipeed/picoclaw/pkg/providers/protocoltypes" ) diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index 44c177759..241cc8c5b 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -103,7 +103,9 @@ func NewProviderWithMaxTokensFieldAndTimeout( } // buildRequestBody constructs the common request body for Chat and ChatStream. -func (p *Provider) buildRequestBody(messages []Message, tools []ToolDefinition, model string, options map[string]any) map[string]any { +func (p *Provider) buildRequestBody( + messages []Message, tools []ToolDefinition, model string, options map[string]any, +) map[string]any { model = normalizeModel(model, p.apiBase) requestBody := map[string]any{