Skip to content

Commit

Permalink
🎨 改进代码样式 (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Dec 23, 2024
1 parent 19192b0 commit 4f48a17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
9 changes: 5 additions & 4 deletions niu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ package niu
import (
"errors"
"fmt"
"github.com/FloatTech/AnimeAPI/wallet"
"github.com/FloatTech/floatbox/file"
sql "github.com/FloatTech/sqlite"
"os"
"strconv"
"strings"
"sync"
"time"

"github.com/FloatTech/floatbox/file"
sql "github.com/FloatTech/sqlite"

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

var (
Expand Down Expand Up @@ -197,7 +199,6 @@ func Register(gid, uid int64) (string, error) {

// JJ ...
func JJ(gid, uid, adduser int64, prop string) (message string, adduserLength float64, err error) {

myniuniu, err := db.getWordNiuNiu(gid, uid)
if err != nil {
return "", 0, ErrNoNiuNiu
Expand Down
6 changes: 2 additions & 4 deletions niu/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ package niu
import (
"errors"
"fmt"
sql "github.com/FloatTech/sqlite"
"math"
"math/rand"
"sort"
"strconv"
"sync"

sql "github.com/FloatTech/sqlite"
)

var (
Expand Down Expand Up @@ -206,7 +207,6 @@ func (u *userInfo) useItem(itemCount *int, errMsg string) error {
}

func (u *userInfo) checkProps(props, propSort string) error {

validProps := map[string][]string{
"dajiao": daJiaoProps,
"jj": jjPorps,
Expand Down Expand Up @@ -320,7 +320,6 @@ func (u *userInfo) processJJuAction(adduserniuniu *userInfo, props string) (stri
}
}
switch {

case u.ShenJi-info.ShenJi != 0:
fencingResult, f, f1 = u.useShenJi(adduserniuniu.Length)
u.Length = f
Expand All @@ -335,7 +334,6 @@ func (u *userInfo) processJJuAction(adduserniuniu *userInfo, props string) (stri
fencingResult, f, f1 = fencing(u.Length, adduserniuniu.Length)
u.Length = f
adduserniuniu.Length = f1

}
return fencingResult, err
}
Expand Down
3 changes: 2 additions & 1 deletion niu/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package niu

import (
"fmt"
"github.com/FloatTech/AnimeAPI/wallet"
"math"
"math/rand"

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

func randomChoice(options []string) string {
Expand Down

0 comments on commit 4f48a17

Please sign in to comment.