Skip to content

Commit 54471d1

Browse files
chore(lint): 改进代码样式 (#982)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 6f7d4be commit 54471d1

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

plugin/niuniu/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ func init() {
320320
}
321321
// 添加数据进入表
322322
if err := db.insertNiuNiu(&u, gid); err != nil {
323-
324323
if err = db.createGIDTable(gid); err != nil {
325324
ctx.SendChain(message.Text("ERROR:", err))
326325
return
@@ -330,7 +329,6 @@ func init() {
330329
ctx.SendChain(message.Text("ERROR:", err))
331330
return
332331
}
333-
334332
}
335333
ctx.SendChain(message.At(uid),
336334
message.Text("注册成功,你的牛牛现在有", u.Length, "cm"))
@@ -433,7 +431,6 @@ func init() {
433431
}
434432
}
435433
}
436-
437434
})
438435
en.OnFullMatch("注销牛牛", getdb, zero.OnlyGroup).SetBlock(true).Handle(func(ctx *zero.Ctx) {
439436
uid := ctx.Event.UserID

plugin/niuniu/utils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,13 @@ func processNiuniuAction(t string, niuniu userInfo, props string) (string, error
9494
load, ok := prop.Load(t)
9595
u = niuniu
9696
if props != "" {
97-
9897
if props != "伟哥" && props != "媚药" {
9998
return "", errors.New("道具不存在")
10099
}
101100

102101
if err = createUserInfoByProps(props, niuniu); err != nil {
103102
return "", err
104103
}
105-
106104
}
107105
switch {
108106
case ok && load.Count > 1 && time.Since(load.TimeLimit) < time.Minute*8:
@@ -124,7 +122,6 @@ func processNiuniuAction(t string, niuniu userInfo, props string) (string, error
124122
default:
125123
messages, f = generateRandomStingTwo(niuniu.Length)
126124
niuniu.Length = f
127-
128125
}
129126
return messages, err
130127
}
@@ -306,15 +303,13 @@ func applySkill(myLength, oppoLength float64, increaseLength1 bool) (string, flo
306303
return fmt.Sprintf("哦吼!?你的牛牛在长大欸!长大了%.2fcm!", reduce), myLength, oppoLength
307304
}
308305
return fmt.Sprintf("你以绝对的长度让对方屈服了呢!你的长度增加%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
309-
310306
}
311307
myLength -= reduce
312308
oppoLength += 0.8 * reduce
313309
if myLength < 0 {
314310
return fmt.Sprintf("哦吼!?看来你的牛牛因为击剑而凹进去了呢🤣🤣🤣!凹进去了%.2fcm!", reduce), myLength, oppoLength
315311
}
316312
return fmt.Sprintf("对方以绝对的长度让你屈服了呢!你的长度减少%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
317-
318313
}
319314

320315
// fence 根据长度计算减少的长度

0 commit comments

Comments
 (0)