diff --git a/cmd/gocq/login.go b/cmd/gocq/login.go index 6d2f0df9a..33b180f23 100644 --- a/cmd/gocq/login.go +++ b/cmd/gocq/login.go @@ -11,13 +11,11 @@ import ( "strings" "time" - "github.com/Mrs4s/go-cqhttp/internal/download" - "github.com/LagrangeDev/LagrangeGo/client" "github.com/LagrangeDev/LagrangeGo/client/auth" "github.com/LagrangeDev/LagrangeGo/client/packets/wtlogin/qrcodestate" "github.com/LagrangeDev/LagrangeGo/utils" - + "github.com/Mrs4s/go-cqhttp/internal/download" "github.com/mattn/go-colorable" "github.com/pkg/errors" log "github.com/sirupsen/logrus" diff --git a/cmd/gocq/main.go b/cmd/gocq/main.go index c45a71a4d..585b513c1 100644 --- a/cmd/gocq/main.go +++ b/cmd/gocq/main.go @@ -13,29 +13,26 @@ import ( "sync" "time" + "github.com/LagrangeDev/LagrangeGo/client" + "github.com/LagrangeDev/LagrangeGo/client/auth" "github.com/LagrangeDev/LagrangeGo/client/packets/pb/action" "github.com/LagrangeDev/LagrangeGo/utils" "github.com/LagrangeDev/LagrangeGo/utils/crypto" - "github.com/Mrs4s/go-cqhttp/internal/selfdiagnosis" - - "github.com/LagrangeDev/LagrangeGo/client/auth" - - "github.com/LagrangeDev/LagrangeGo/client" - para "github.com/fumiama/go-hide-param" - rotatelogs "github.com/lestrrat-go/file-rotatelogs" - log "github.com/sirupsen/logrus" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/term" - "github.com/Mrs4s/go-cqhttp/coolq" "github.com/Mrs4s/go-cqhttp/db" "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/global/terminal" "github.com/Mrs4s/go-cqhttp/internal/base" "github.com/Mrs4s/go-cqhttp/internal/cache" + "github.com/Mrs4s/go-cqhttp/internal/selfdiagnosis" "github.com/Mrs4s/go-cqhttp/internal/selfupdate" "github.com/Mrs4s/go-cqhttp/modules/servers" "github.com/Mrs4s/go-cqhttp/server" + para "github.com/fumiama/go-hide-param" + rotatelogs "github.com/lestrrat-go/file-rotatelogs" + log "github.com/sirupsen/logrus" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/term" ) // InitBase 解析参数并检测 diff --git a/coolq/api.go b/coolq/api.go index 611dcccd7..57ce6d042 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -8,35 +8,30 @@ import ( "errors" "fmt" "math" - "strconv" - "time" - - "github.com/LagrangeDev/LagrangeGo/client/sign" - - "github.com/Mrs4s/go-cqhttp/internal/msg" - - "github.com/LagrangeDev/LagrangeGo/client/entity" - "os" "path" "path/filepath" "runtime" + "strconv" "strings" + "time" + "github.com/LagrangeDev/LagrangeGo/client/entity" + "github.com/LagrangeDev/LagrangeGo/client/sign" "github.com/LagrangeDev/LagrangeGo/message" - "github.com/LagrangeDev/LagrangeGo/utils/binary" - log "github.com/sirupsen/logrus" - "github.com/tidwall/gjson" - "github.com/LagrangeDev/LagrangeGo/utils" + "github.com/LagrangeDev/LagrangeGo/utils/binary" "github.com/Mrs4s/go-cqhttp/db" "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/internal/base" "github.com/Mrs4s/go-cqhttp/internal/cache" "github.com/Mrs4s/go-cqhttp/internal/download" + "github.com/Mrs4s/go-cqhttp/internal/msg" "github.com/Mrs4s/go-cqhttp/internal/param" "github.com/Mrs4s/go-cqhttp/modules/filter" "github.com/Mrs4s/go-cqhttp/pkg/onebot" + log "github.com/sirupsen/logrus" + "github.com/tidwall/gjson" ) // CQGetLoginInfo 获取登录号信息 diff --git a/coolq/api_v12.go b/coolq/api_v12.go index cbda8ed51..f3485f4e8 100644 --- a/coolq/api_v12.go +++ b/coolq/api_v12.go @@ -3,10 +3,9 @@ package coolq import ( "runtime" - "github.com/tidwall/gjson" - "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/internal/base" + "github.com/tidwall/gjson" ) // CQGetVersion 获取版本信息 OneBotV12 diff --git a/coolq/bot.go b/coolq/bot.go index 134f88da5..8b965be22 100644 --- a/coolq/bot.go +++ b/coolq/bot.go @@ -12,28 +12,23 @@ import ( "sync" "time" - "github.com/LagrangeDev/LagrangeGo/client/sign" - - "github.com/LagrangeDev/LagrangeGo/utils/binary" - - "github.com/Mrs4s/go-cqhttp/internal/mime" - "golang.org/x/image/webp" - + "github.com/LagrangeDev/LagrangeGo/client" "github.com/LagrangeDev/LagrangeGo/client/entity" event2 "github.com/LagrangeDev/LagrangeGo/client/event" - "github.com/LagrangeDev/LagrangeGo/utils" - - "github.com/LagrangeDev/LagrangeGo/client" + "github.com/LagrangeDev/LagrangeGo/client/sign" "github.com/LagrangeDev/LagrangeGo/message" - "github.com/RomiChan/syncx" - "github.com/pkg/errors" - log "github.com/sirupsen/logrus" - + "github.com/LagrangeDev/LagrangeGo/utils" + "github.com/LagrangeDev/LagrangeGo/utils/binary" "github.com/Mrs4s/go-cqhttp/db" "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/internal/base" + "github.com/Mrs4s/go-cqhttp/internal/mime" "github.com/Mrs4s/go-cqhttp/internal/msg" "github.com/Mrs4s/go-cqhttp/pkg/onebot" + "github.com/RomiChan/syncx" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "golang.org/x/image/webp" ) // CQBot CQBot结构体,存储Bot实例相关配置 diff --git a/coolq/converter.go b/coolq/converter.go index 384bdbe23..a40885765 100644 --- a/coolq/converter.go +++ b/coolq/converter.go @@ -5,12 +5,9 @@ import ( "strings" "github.com/LagrangeDev/LagrangeGo/client/entity" - "github.com/LagrangeDev/LagrangeGo/message" - - log "github.com/sirupsen/logrus" - "github.com/Mrs4s/go-cqhttp/global" + log "github.com/sirupsen/logrus" ) func convertGroupMemberInfo(groupID int64, m *entity.GroupMember) global.MSG { diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 2b34d6ba5..90b68d0fd 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -15,16 +15,10 @@ import ( "strings" "time" - "github.com/LagrangeDev/LagrangeGo/utils" - "github.com/LagrangeDev/LagrangeGo/utils/crypto" - "github.com/LagrangeDev/LagrangeGo/message" + "github.com/LagrangeDev/LagrangeGo/utils" "github.com/LagrangeDev/LagrangeGo/utils/binary" - b14 "github.com/fumiama/go-base16384" - "github.com/segmentio/asm/base64" - log "github.com/sirupsen/logrus" - "github.com/tidwall/gjson" - + "github.com/LagrangeDev/LagrangeGo/utils/crypto" "github.com/Mrs4s/go-cqhttp/db" "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/internal/base" @@ -34,6 +28,10 @@ import ( "github.com/Mrs4s/go-cqhttp/internal/msg" "github.com/Mrs4s/go-cqhttp/internal/param" "github.com/Mrs4s/go-cqhttp/pkg/onebot" + b14 "github.com/fumiama/go-base16384" + "github.com/segmentio/asm/base64" + log "github.com/sirupsen/logrus" + "github.com/tidwall/gjson" ) // TODO: move this file to internal/msg, internal/onebot diff --git a/coolq/event.go b/coolq/event.go index 2043f57ed..3aba3c1ee 100644 --- a/coolq/event.go +++ b/coolq/event.go @@ -8,19 +8,17 @@ import ( "strconv" "strings" - log "github.com/sirupsen/logrus" - "github.com/LagrangeDev/LagrangeGo/client" "github.com/LagrangeDev/LagrangeGo/client/entity" event2 "github.com/LagrangeDev/LagrangeGo/client/event" "github.com/LagrangeDev/LagrangeGo/message" "github.com/LagrangeDev/LagrangeGo/utils/binary" - "github.com/Mrs4s/go-cqhttp/db" "github.com/Mrs4s/go-cqhttp/global" "github.com/Mrs4s/go-cqhttp/internal/base" "github.com/Mrs4s/go-cqhttp/internal/cache" "github.com/Mrs4s/go-cqhttp/internal/download" + log "github.com/sirupsen/logrus" ) // ToFormattedMessage 将给定[]message.IMessageElement转换为通过coolq.SetMessageFormat所定义的消息上报格式 diff --git a/db/leveldb/leveldb.go b/db/leveldb/leveldb.go index 8adde821e..498cf2b0b 100644 --- a/db/leveldb/leveldb.go +++ b/db/leveldb/leveldb.go @@ -3,16 +3,13 @@ package leveldb import ( "path" - "github.com/LagrangeDev/LagrangeGo/utils/binary" - "github.com/LagrangeDev/LagrangeGo/utils" - + "github.com/LagrangeDev/LagrangeGo/utils/binary" + "github.com/Mrs4s/go-cqhttp/db" "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" "gopkg.in/yaml.v3" - - "github.com/Mrs4s/go-cqhttp/db" ) type database struct { diff --git a/db/leveldb/reader.go b/db/leveldb/reader.go index fef6ebd71..6705e9bc4 100644 --- a/db/leveldb/reader.go +++ b/db/leveldb/reader.go @@ -6,9 +6,8 @@ import ( "strconv" "strings" - "github.com/pkg/errors" - "github.com/Mrs4s/go-cqhttp/global" + "github.com/pkg/errors" ) type intReader struct { diff --git a/db/mongodb/mongodb.go b/db/mongodb/mongodb.go index c18bada36..3375638c2 100644 --- a/db/mongodb/mongodb.go +++ b/db/mongodb/mongodb.go @@ -3,13 +3,12 @@ package mongodb import ( "context" + "github.com/Mrs4s/go-cqhttp/db" "github.com/pkg/errors" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "gopkg.in/yaml.v3" - - "github.com/Mrs4s/go-cqhttp/db" ) type database struct { diff --git a/db/multidb.go b/db/multidb.go index 0129a311b..e53baa9fc 100644 --- a/db/multidb.go +++ b/db/multidb.go @@ -1,10 +1,9 @@ package db import ( + "github.com/Mrs4s/go-cqhttp/internal/base" "github.com/pkg/errors" "gopkg.in/yaml.v3" - - "github.com/Mrs4s/go-cqhttp/internal/base" ) // backends 多数据库支持, 后端支持 diff --git a/db/sqlite3/sqlite3.go b/db/sqlite3/sqlite3.go index fe5dcf135..595fac030 100644 --- a/db/sqlite3/sqlite3.go +++ b/db/sqlite3/sqlite3.go @@ -8,16 +8,13 @@ import ( "sync" "time" - "github.com/LagrangeDev/LagrangeGo/utils/binary" - - "github.com/LagrangeDev/LagrangeGo/utils" - sql "github.com/FloatTech/sqlite" + "github.com/LagrangeDev/LagrangeGo/utils" + "github.com/LagrangeDev/LagrangeGo/utils/binary" + "github.com/Mrs4s/go-cqhttp/db" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "gopkg.in/yaml.v3" - - "github.com/Mrs4s/go-cqhttp/db" ) type database struct { diff --git a/internal/msg/element.go b/internal/msg/element.go index f47b13d60..e827d9bde 100644 --- a/internal/msg/element.go +++ b/internal/msg/element.go @@ -2,10 +2,10 @@ package msg import ( - "github.com/LagrangeDev/LagrangeGo/utils/binary" - "strings" "unicode/utf8" + + "github.com/LagrangeDev/LagrangeGo/utils/binary" ) // @@@ CQ码转义处理 @@@ diff --git a/internal/msg/local.go b/internal/msg/local.go index aa30e8322..eb4149364 100644 --- a/internal/msg/local.go +++ b/internal/msg/local.go @@ -1,8 +1,9 @@ package msg import ( - "github.com/LagrangeDev/LagrangeGo/message" "io" + + "github.com/LagrangeDev/LagrangeGo/message" ) // Poke 拍一拍