Skip to content

Commit 180d338

Browse files
🎨 改进代码样式 (#78)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent ce56eb8 commit 180d338

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

niu/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package niu
22

33
import (
44
"fmt"
5+
56
"github.com/RomiChan/syncx"
67
"github.com/jinzhu/gorm"
78
"github.com/sirupsen/logrus"
@@ -27,7 +28,6 @@ func ensureTable[T userInfo | AuctionInfo](gid int64, prefix string) error {
2728
}
2829

2930
func tableFor(gid int64, prefix string) *gorm.DB {
30-
3131
switch prefix {
3232
case usr:
3333
err := ensureTable[userInfo](gid, usr)

niu/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ package niu
44
import (
55
"errors"
66
"fmt"
7-
"github.com/google/uuid"
8-
"github.com/jinzhu/gorm"
97
"os"
108
"strconv"
119
"strings"
1210
"sync"
1311

12+
"github.com/google/uuid"
13+
"github.com/jinzhu/gorm"
14+
1415
"github.com/FloatTech/floatbox/file"
1516

1617
"github.com/FloatTech/AnimeAPI/wallet"

niu/models.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ package niu
44
import (
55
"errors"
66
"fmt"
7-
"github.com/google/uuid"
8-
"github.com/jinzhu/gorm"
97
"math"
108
"math/rand"
119
"sort"
1210
"time"
11+
12+
"github.com/google/uuid"
13+
"github.com/jinzhu/gorm"
1314
)
1415

1516
var (
@@ -259,7 +260,6 @@ func (u *userInfo) checkProps(props, propSort string) error {
259260
}
260261

261262
func (u *userInfo) purchaseItem(productID, quantity int) (money int, err error) {
262-
263263
m := map[int]int{
264264
1: 300, // 伟哥
265265
2: 300, // 媚药

0 commit comments

Comments
 (0)