chore(lint): 改进代码样式 (#1143)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-03-25 12:33:02 +09:00
committed by GitHub
parent e292b69ee5
commit 6c6699a5d6
4 changed files with 44 additions and 41 deletions

View File

@@ -2,9 +2,10 @@ package minecraftobserver
import (
"encoding/json"
"time"
"github.com/RomiChan/syncx"
"github.com/Tnze/go-mc/bot"
"time"
)
var (
@@ -49,12 +50,12 @@ func getMinecraftServerStatus(addr string) (*serverPingAndListResp, error) {
var s serverPingAndListResp
resp, delay, err := bot.PingAndListTimeout(addr, time.Second*5)
if err != nil {
//logrus.Errorln(logPrefix+"PingAndList error: ", err)
// logrus.Errorln(logPrefix+"PingAndList error: ", err)
return nil, err
}
err = json.Unmarshal(resp, &s)
if err != nil {
//logrus.Errorln(logPrefix+"Parse json response fail: ", err)
// logrus.Errorln(logPrefix+"Parse json response fail: ", err)
return nil, err
}
s.Delay = delay