Skip to content

Commit 4f48a17

Browse files
🎨 改进代码样式 (FloatTech#62)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 19192b0 commit 4f48a17

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

niu/main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ package niu
44
import (
55
"errors"
66
"fmt"
7-
"github.com/FloatTech/AnimeAPI/wallet"
8-
"github.com/FloatTech/floatbox/file"
9-
sql "github.com/FloatTech/sqlite"
107
"os"
118
"strconv"
129
"strings"
1310
"sync"
1411
"time"
12+
13+
"github.com/FloatTech/floatbox/file"
14+
sql "github.com/FloatTech/sqlite"
15+
16+
"github.com/FloatTech/AnimeAPI/wallet"
1517
)
1618

1719
var (
@@ -197,7 +199,6 @@ func Register(gid, uid int64) (string, error) {
197199

198200
// JJ ...
199201
func JJ(gid, uid, adduser int64, prop string) (message string, adduserLength float64, err error) {
200-
201202
myniuniu, err := db.getWordNiuNiu(gid, uid)
202203
if err != nil {
203204
return "", 0, ErrNoNiuNiu

niu/models.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ package niu
44
import (
55
"errors"
66
"fmt"
7-
sql "github.com/FloatTech/sqlite"
87
"math"
98
"math/rand"
109
"sort"
1110
"strconv"
1211
"sync"
12+
13+
sql "github.com/FloatTech/sqlite"
1314
)
1415

1516
var (
@@ -206,7 +207,6 @@ func (u *userInfo) useItem(itemCount *int, errMsg string) error {
206207
}
207208

208209
func (u *userInfo) checkProps(props, propSort string) error {
209-
210210
validProps := map[string][]string{
211211
"dajiao": daJiaoProps,
212212
"jj": jjPorps,
@@ -320,7 +320,6 @@ func (u *userInfo) processJJuAction(adduserniuniu *userInfo, props string) (stri
320320
}
321321
}
322322
switch {
323-
324323
case u.ShenJi-info.ShenJi != 0:
325324
fencingResult, f, f1 = u.useShenJi(adduserniuniu.Length)
326325
u.Length = f
@@ -335,7 +334,6 @@ func (u *userInfo) processJJuAction(adduserniuniu *userInfo, props string) (stri
335334
fencingResult, f, f1 = fencing(u.Length, adduserniuniu.Length)
336335
u.Length = f
337336
adduserniuniu.Length = f1
338-
339337
}
340338
return fencingResult, err
341339
}

niu/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package niu
33

44
import (
55
"fmt"
6-
"github.com/FloatTech/AnimeAPI/wallet"
76
"math"
87
"math/rand"
8+
9+
"github.com/FloatTech/AnimeAPI/wallet"
910
)
1011

1112
func randomChoice(options []string) string {

0 commit comments

Comments
 (0)