From e02441fc4ef27d53487f6774dabc09dc5e61eb02 Mon Sep 17 00:00:00 2001 From: Jorge Fernando dos Santos Date: Mon, 9 Nov 2026 13:12:30 -0300 Subject: [PATCH] style: gofmt files touched by the community fixes Co-Authored-By: Claude Opus 5.5 --- cmd/evolution-go/main.go | 2 +- pkg/call/service/call_service.go | 2 +- pkg/chat/service/chat_service.go | 2 +- pkg/community/service/community_service.go | 2 +- pkg/group/service/group_service.go | 2 +- pkg/instance/service/instance_service.go | 2 +- pkg/label/service/label_service.go | 2 +- pkg/message/service/message_service.go | 2 +- pkg/newsletter/service/newsletter_service.go | 2 +- pkg/safemap/safemap.go | 4 ++-- pkg/sendMessage/service/send_service.go | 2 +- pkg/user/service/user_service.go | 2 +- pkg/utils/utils.go | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/evolution-go/main.go b/cmd/evolution-go/main.go index 7ca5055..95a8091 100644 --- a/cmd/evolution-go/main.go +++ b/cmd/evolution-go/main.go @@ -1,11 +1,11 @@ package main import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "database/sql" "flag" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "log" "net/http" "os" diff --git a/pkg/call/service/call_service.go b/pkg/call/service/call_service.go index c62258d..426d667 100644 --- a/pkg/call/service/call_service.go +++ b/pkg/call/service/call_service.go @@ -1,9 +1,9 @@ package call_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "time" instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model" diff --git a/pkg/chat/service/chat_service.go b/pkg/chat/service/chat_service.go index 26e0f2b..cc7fe12 100644 --- a/pkg/chat/service/chat_service.go +++ b/pkg/chat/service/chat_service.go @@ -1,9 +1,9 @@ package chat_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "time" instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model" diff --git a/pkg/community/service/community_service.go b/pkg/community/service/community_service.go index 8aa0597..995509c 100644 --- a/pkg/community/service/community_service.go +++ b/pkg/community/service/community_service.go @@ -1,9 +1,9 @@ package community_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "time" instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model" diff --git a/pkg/group/service/group_service.go b/pkg/group/service/group_service.go index 04fbc0a..e94f2d2 100644 --- a/pkg/group/service/group_service.go +++ b/pkg/group/service/group_service.go @@ -1,10 +1,10 @@ package group_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "io" "net/http" "strings" diff --git a/pkg/instance/service/instance_service.go b/pkg/instance/service/instance_service.go index 54dd2c2..8ebd41a 100644 --- a/pkg/instance/service/instance_service.go +++ b/pkg/instance/service/instance_service.go @@ -1,13 +1,13 @@ package instance_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "bufio" "context" "encoding/base64" "encoding/json" "errors" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "os" "path/filepath" "slices" diff --git a/pkg/label/service/label_service.go b/pkg/label/service/label_service.go index ee34e54..028b1cc 100644 --- a/pkg/label/service/label_service.go +++ b/pkg/label/service/label_service.go @@ -1,9 +1,9 @@ package label_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "time" instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model" diff --git a/pkg/message/service/message_service.go b/pkg/message/service/message_service.go index f283692..e5af60e 100644 --- a/pkg/message/service/message_service.go +++ b/pkg/message/service/message_service.go @@ -1,10 +1,10 @@ package message_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "net/http" "os" "strings" diff --git a/pkg/newsletter/service/newsletter_service.go b/pkg/newsletter/service/newsletter_service.go index f1a91a1..7b72c47 100644 --- a/pkg/newsletter/service/newsletter_service.go +++ b/pkg/newsletter/service/newsletter_service.go @@ -1,9 +1,9 @@ package newsletter_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "time" instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model" diff --git a/pkg/safemap/safemap.go b/pkg/safemap/safemap.go index 4e0f0c4..4bed1c3 100644 --- a/pkg/safemap/safemap.go +++ b/pkg/safemap/safemap.go @@ -1,6 +1,6 @@ // Package safemap holds the process-wide maps that are shared across goroutines. // -// WHY THIS EXISTS +// # WHY THIS EXISTS // // The three state maps of the process (clientPointer, myClientPointer and // killChannel) are created once at startup and passed BY REFERENCE into eleven @@ -19,7 +19,7 @@ // within seconds, but every number was offline in the meantime, and it repeats // on every restart that brings up more than a couple of instances at once. // -// WHY A SEPARATE PACKAGE, AND WHY GENERICS +// # WHY A SEPARATE PACKAGE, AND WHY GENERICS // // MyClient lives in pkg/whatsmeow/service. If the safe type lived there, the // other ten packages would have to import that package and an import cycle diff --git a/pkg/sendMessage/service/send_service.go b/pkg/sendMessage/service/send_service.go index eda305e..245a9c6 100644 --- a/pkg/sendMessage/service/send_service.go +++ b/pkg/sendMessage/service/send_service.go @@ -1,7 +1,6 @@ package send_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "bytes" "context" crypto_rand "crypto/rand" @@ -9,6 +8,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "image" "image/jpeg" "image/png" diff --git a/pkg/user/service/user_service.go b/pkg/user/service/user_service.go index 090b9ff..bc749d1 100644 --- a/pkg/user/service/user_service.go +++ b/pkg/user/service/user_service.go @@ -1,10 +1,10 @@ package user_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "context" "errors" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "io" "net/http" "time" diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index b966210..1cb9338 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -214,7 +214,7 @@ func ParseJID(arg string) (whatsmeow_types.JID, bool) { recipient.User = strings.TrimPrefix(recipient.User, "+") } - if recipient.User == "" &&!strings.Contains(jidString, "@broadcast") { + if recipient.User == "" && !strings.Contains(jidString, "@broadcast") { logger.LogError("Invalid JID. No user specified: %s", jidString) return recipient, false }