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 c9ba1fa commit 79f3190
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/gocq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"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 Expand Up @@ -122,12 +121,12 @@ func LoginInteract() {
if len(arg) > 1 {
for i := range arg {
switch arg[i] {

Check failure on line 123 in cmd/gocq/main.go

View workflow job for this annotation

GitHub Actions / lint

singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
case "update":
if len(arg) > i+1 {
selfupdate.SelfUpdate(arg[i+1])
} else {
selfupdate.SelfUpdate("")
}
// case "update":
// if len(arg) > i+1 {
// selfupdate.SelfUpdate(arg[i+1])
// } else {
// selfupdate.SelfUpdate("")
// }
case "key":
p := i + 1
if len(arg) > p {
Expand Down Expand Up @@ -240,6 +239,7 @@ func LoginInteract() {
// time.Sleep(time.Second * 5)
// }
cli = newClient()
cli.UseDevice(device)
// 加载本地版本信息, 一般是在上次登录时保存的
versionFile := path.Join(global.VersionsPath, fmt.Sprint(int(cli.Device().Protocol))+".json")
if global.PathExists(versionFile) {
Expand Down Expand Up @@ -419,7 +419,7 @@ func LoginInteract() {
// - dump stack: syscall.SIGQUIT, syscall.SIGUSR1
func WaitSignal() {
go func() {
selfupdate.CheckUpdate()
// selfupdate.CheckUpdate()
selfdiagnosis.NetworkDiagnosis(cli)
}()

Expand Down

0 comments on commit 79f3190

Please sign in to comment.