mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
💩👌 make lint happy
This commit is contained in:
parent
d8bc336006
commit
adfa9f9e0f
@ -18,7 +18,6 @@ linters:
|
||||
fast: false
|
||||
enable:
|
||||
- bodyclose
|
||||
- deadcode
|
||||
- depguard
|
||||
- dogsled
|
||||
- errcheck
|
||||
@ -39,13 +38,11 @@ linters:
|
||||
- nolintlint
|
||||
- rowserrcheck
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- stylecheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- varcheck
|
||||
- whitespace
|
||||
- prealloc
|
||||
- predeclared
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// Package main generates banner.go
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
// Package hyaku 百人一首
|
||||
|
||||
//nolint: asciicheck
|
||||
|
||||
package hyaku
|
||||
|
||||
import (
|
||||
@ -23,7 +26,6 @@ import (
|
||||
|
||||
const bed = "https://gitcode.net/u011570312/OguraHyakuninIsshu/-/raw/master/"
|
||||
|
||||
// nolint: asciicheck
|
||||
type line struct {
|
||||
番号, 歌人, 上の句, 下の句, 上の句ひらがな, 下の句ひらがな string
|
||||
}
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
// Package qqwife 娶群友 基于“翻牌”和江林大佬的“群老婆”插件魔改作品,文案采用了Hana的zbp娶群友文案
|
||||
|
||||
//nolint: asciicheck
|
||||
|
||||
package qqwife
|
||||
|
||||
import (
|
||||
@ -29,8 +32,6 @@ import (
|
||||
// 货币系统
|
||||
)
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
type 婚姻登记 struct {
|
||||
db *sql.Sqlite
|
||||
sync.RWMutex
|
||||
@ -56,8 +57,6 @@ type userinfo struct {
|
||||
}
|
||||
|
||||
var (
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
民政局 = &婚姻登记{
|
||||
db: &sql.Sqlite{},
|
||||
}
|
||||
@ -301,8 +300,6 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 查看设置(gid int64) (dbinfo updateinfo, err error) {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -324,16 +321,12 @@ func (sql *婚姻登记) 查看设置(gid int64) (dbinfo updateinfo, err error)
|
||||
return
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 更新设置(dbinfo updateinfo) error {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
return sql.db.Insert("updateinfo", &dbinfo)
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 开门时间(gid int64) error {
|
||||
grouInfo, err := sql.查看设置(gid)
|
||||
if err != nil {
|
||||
@ -354,8 +347,6 @@ func (sql *婚姻登记) 开门时间(gid int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 查户口(gid, uid int64) (info userinfo, err error) {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -373,8 +364,6 @@ func (sql *婚姻登记) 查户口(gid, uid int64) (info userinfo, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
// 民政局登记数据
|
||||
func (sql *婚姻登记) 登记(gid, uid, target int64, username, targetname string) error {
|
||||
sql.Lock()
|
||||
@ -390,8 +379,6 @@ func (sql *婚姻登记) 登记(gid, uid, target int64, username, targetname str
|
||||
return sql.db.Insert(gidstr, &uidinfo)
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 花名册(gid int64) (list [][4]string, err error) {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -437,8 +424,6 @@ func slicename(name string, canvas *gg.Context) (resultname string) {
|
||||
return
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 清理花名册(gid ...string) error {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
//nolint: asciicheck
|
||||
|
||||
package qqwife
|
||||
|
||||
import (
|
||||
@ -12,6 +14,7 @@ import (
|
||||
"github.com/FloatTech/zbputils/ctxext"
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
|
||||
// 画图
|
||||
"github.com/Coloured-glaze/gg"
|
||||
"github.com/FloatTech/floatbox/file"
|
||||
@ -192,8 +195,6 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
func (sql *婚姻登记) 查好感度(uid, target int64) (int, error) {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -246,8 +247,6 @@ func (sql *婚姻登记) getGroupFavorability(uid int64) (list favorList, err er
|
||||
return
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
//nolint: asciicheck
|
||||
// 设置好感度 正增负减
|
||||
func (sql *婚姻登记) 更新好感度(uid, target int64, score int) (favor int, err error) {
|
||||
sql.Lock()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
//nolint: asciicheck
|
||||
|
||||
package qqwife
|
||||
|
||||
import (
|
||||
@ -359,8 +361,6 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
// nolint: asciicheck
|
||||
func (sql *婚姻登记) 判断CD(gid, uid int64, model string, cdtime float64) (ok bool, err error) {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -386,8 +386,6 @@ func (sql *婚姻登记) 判断CD(gid, uid int64, model string, cdtime float64)
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
// nolint: asciicheck
|
||||
func (sql *婚姻登记) 记录CD(gid, uid int64, mode string) error {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -399,8 +397,6 @@ func (sql *婚姻登记) 记录CD(gid, uid int64, mode string) error {
|
||||
})
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
// nolint: asciicheck
|
||||
func (sql *婚姻登记) 离婚休妻(gid, wife int64) error {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
@ -409,8 +405,6 @@ func (sql *婚姻登记) 离婚休妻(gid, wife int64) error {
|
||||
return sql.db.Del(gidstr, "where target = "+wifestr)
|
||||
}
|
||||
|
||||
// nolint: asciicheck
|
||||
// nolint: asciicheck
|
||||
func (sql *婚姻登记) 离婚休夫(gid, husband int64) error {
|
||||
sql.Lock()
|
||||
defer sql.Unlock()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user