Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
Fripine committed Oct 10, 2024
1 parent a5923f1 commit 3fdb146
Show file tree
Hide file tree
Showing 57 changed files with 219 additions and 217 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ body:
options:
- label: "我已经仔细阅读上述教程和 [\"提问前需知\"](https://forums.go-cqhttp.org/t/topic/141)"
required: true
- label: "我已经使用 [dev分支版本](https://github.com/Mrs4s/go-cqhttp/actions/workflows/ci.yml) 测试过,问题依旧存在。"
- label: "我已经使用 [dev分支版本](https://github.com/sealdice/go-cqhttp/actions/workflows/ci.yml) 测试过,问题依旧存在。"
required: true
- label: "我已经在 [Issue Tracker](https://github.com/Mrs4s/go-cqhttp/issues) 中找过我要提出的问题,没有找到相同问题的ISSUE。"
- label: "我已经在 [Issue Tracker](https://github.com/sealdice/go-cqhttp/issues) 中找过我要提出的问题,没有找到相同问题的ISSUE。"
required: true
- label: 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)
required: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build And Push Docker Image

on:
push:
branches:
- 'master'
- 'dev'
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
# push:
# branches:
# - 'master'
# - 'dev'
# # Sequence of patterns matched against refs/tags
# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

workflow_dispatch:

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

on: [push, pull_request,workflow_dispatch]
on:
workflow_dispatch:

env:
BINARY_PREFIX: "go-cqhttp_"
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
if $IS_PR ; then echo $PR_PROMPT; fi
export BINARY_NAME="$BINARY_PREFIX"$GOOS"_$GOARCH$BINARY_SUFFIX"
export CGO_ENABLED=0
export LD_FLAGS="-w -s -X github.com/Mrs4s/go-cqhttp/internal/base.Version=${COMMIT_ID::7}"
export LD_FLAGS="-w -s -X github.com/sealdice/go-cqhttp/internal/base.Version=${COMMIT_ID::7}"
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" .
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linters-settings:
ignoretests: true

goimports:
local-prefixes: github.com/Mrs4s/go-cqhttp
local-prefixes: github.com/sealdice/go-cqhttp

gocritic:
disabled-checks:
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ builds:
flags:
- -trimpath
ldflags:
- -s -w -X github.com/Mrs4s/go-cqhttp/internal/base.Version=v{{.Version}}
- -s -w -X github.com/sealdice/go-cqhttp/internal/base.Version=v{{.Version}}
- id: win
env:
- CGO_ENABLED=0
Expand All @@ -51,7 +51,7 @@ builds:
flags:
- -trimpath
ldflags:
- -s -w -X github.com/Mrs4s/go-cqhttp/internal/base.Version=v{{.Version}}
- -s -w -X github.com/sealdice/go-cqhttp/internal/base.Version=v{{.Version}}

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
Expand Down
6 changes: 3 additions & 3 deletions cmd/api-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func (g *generator) header() {

func (g *generator) genRouter(routers []Router) {
g.WriteString("import (\n\n")
g.WriteString("\"github.com/Mrs4s/go-cqhttp/coolq\"\n")
g.WriteString("\"github.com/Mrs4s/go-cqhttp/global\"\n")
g.WriteString("\"github.com/Mrs4s/go-cqhttp/pkg/onebot\"\n")
g.WriteString("\"github.com/sealdice/go-cqhttp/coolq\"\n")
g.WriteString("\"github.com/sealdice/go-cqhttp/global\"\n")
g.WriteString("\"github.com/sealdice/go-cqhttp/pkg/onebot\"\n")
g.WriteString(")\n\n")
g.WriteString(`func (c *Caller) call(action string, spec *onebot.Spec, p Getter) global.MSG {`)
genVer := func(path int) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gocq/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
"strings"
"time"

"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/mattn/go-colorable"
"github.com/pkg/errors"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/utils"
log "github.com/sirupsen/logrus"
"gopkg.ilharper.com/x/isatty"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/Mrs4s/go-cqhttp/internal/download"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/download"
)

var console = bufio.NewReader(os.Stdin)
Expand Down
28 changes: 14 additions & 14 deletions cmd/gocq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import (
"sync"
"time"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/wrapper"
para "github.com/fumiama/go-hide-param"
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"github.com/pkg/errors"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/wrapper"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"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/download"
"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"
"github.com/sealdice/go-cqhttp/coolq"
"github.com/sealdice/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global/terminal"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/cache"
"github.com/sealdice/go-cqhttp/internal/download"
"github.com/sealdice/go-cqhttp/internal/selfdiagnosis"
"github.com/sealdice/go-cqhttp/internal/selfupdate"
"github.com/sealdice/go-cqhttp/modules/servers"
"github.com/sealdice/go-cqhttp/server"
)

// 允许通过配置文件设置的状态列表
Expand Down
10 changes: 5 additions & 5 deletions cmd/gocq/qsign.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"

"github.com/Mrs4s/MiraiGo/utils"
"github.com/sealdice/MiraiGo/utils"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/Mrs4s/go-cqhttp/internal/base"
"github.com/Mrs4s/go-cqhttp/internal/download"
"github.com/Mrs4s/go-cqhttp/modules/config"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/download"
"github.com/sealdice/go-cqhttp/modules/config"
)

type currentSignServer atomic.Pointer[config.SignServer]
Expand Down
26 changes: 13 additions & 13 deletions coolq/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ import (
"strings"
"time"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/message"
"github.com/sealdice/MiraiGo/utils"
"github.com/segmentio/asm/base64"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"

"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"
"github.com/sealdice/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/cache"
"github.com/sealdice/go-cqhttp/internal/download"
"github.com/sealdice/go-cqhttp/internal/msg"
"github.com/sealdice/go-cqhttp/internal/param"
"github.com/sealdice/go-cqhttp/modules/filter"
"github.com/sealdice/go-cqhttp/pkg/onebot"
)

type guildMemberPageToken struct {
Expand Down
4 changes: 2 additions & 2 deletions coolq/api_v12.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/tidwall/gjson"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/Mrs4s/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
)

// CQGetVersion 获取版本信息 OneBotV12
Expand Down
20 changes: 10 additions & 10 deletions coolq/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ import (
"sync"
"time"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/RomiChan/syncx"
"github.com/pkg/errors"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/message"
"github.com/sealdice/MiraiGo/utils"
"github.com/segmentio/asm/base64"
log "github.com/sirupsen/logrus"
"golang.org/x/image/webp"

"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/sealdice/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/mime"
"github.com/sealdice/go-cqhttp/internal/msg"
"github.com/sealdice/go-cqhttp/pkg/onebot"
)

// CQBot CQBot结构体,存储Bot实例相关配置
Expand Down
8 changes: 4 additions & 4 deletions coolq/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"strconv"
"strings"

"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/topic"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/message"
"github.com/sealdice/MiraiGo/topic"
log "github.com/sirupsen/logrus"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global"
)

func convertGroupMemberInfo(groupID int64, m *client.GroupMemberInfo) global.MSG {
Expand Down
24 changes: 12 additions & 12 deletions coolq/cqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ import (
"strings"
"time"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
b14 "github.com/fumiama/go-base16384"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/message"
"github.com/sealdice/MiraiGo/utils"
"github.com/segmentio/asm/base64"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"

"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/mime"
"github.com/Mrs4s/go-cqhttp/internal/msg"
"github.com/Mrs4s/go-cqhttp/internal/param"
"github.com/Mrs4s/go-cqhttp/pkg/onebot"
"github.com/sealdice/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/cache"
"github.com/sealdice/go-cqhttp/internal/download"
"github.com/sealdice/go-cqhttp/internal/mime"
"github.com/sealdice/go-cqhttp/internal/msg"
"github.com/sealdice/go-cqhttp/internal/param"
"github.com/sealdice/go-cqhttp/pkg/onebot"
)

// TODO: move this file to internal/msg, internal/onebot
Expand Down
16 changes: 8 additions & 8 deletions coolq/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
"strconv"
"strings"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/message"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/client"
"github.com/sealdice/MiraiGo/message"
log "github.com/sirupsen/logrus"

"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/sealdice/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/internal/base"
"github.com/sealdice/go-cqhttp/internal/cache"
"github.com/sealdice/go-cqhttp/internal/download"
)

// ToFormattedMessage 将给定[]message.IMessageElement转换为通过coolq.SetMessageFormat所定义的消息上报格式
Expand Down
4 changes: 2 additions & 2 deletions coolq/feed.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package coolq

import (
"github.com/Mrs4s/MiraiGo/topic"
"github.com/sealdice/MiraiGo/topic"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global"
)

// FeedContentsToArrayMessage 将话题频道帖子内容转换为 Array Message
Expand Down
2 changes: 1 addition & 1 deletion db/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"hash/crc32"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions db/leveldb/leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package leveldb
import (
"path"

"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"github.com/sealdice/MiraiGo/binary"
"github.com/sealdice/MiraiGo/utils"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"gopkg.in/yaml.v3"

"github.com/Mrs4s/go-cqhttp/db"
"github.com/sealdice/go-cqhttp/db"
)

type database struct {
Expand Down
2 changes: 1 addition & 1 deletion db/leveldb/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/pkg/errors"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global"
)

type intReader struct {
Expand Down
2 changes: 1 addition & 1 deletion db/leveldb/structs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package leveldb

import "github.com/Mrs4s/go-cqhttp/db"
import "github.com/sealdice/go-cqhttp/db"

func (w *writer) writeStoredGroupMessage(x *db.StoredGroupMessage) {
if x == nil {
Expand Down
2 changes: 1 addition & 1 deletion db/leveldb/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package leveldb
import (
"bytes"

"github.com/Mrs4s/go-cqhttp/global"
"github.com/sealdice/go-cqhttp/global"
)

type intWriter struct {
Expand Down
Loading

0 comments on commit 3fdb146

Please sign in to comment.