Skip to content

Commit

Permalink
💩👌 make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Dec 10, 2022
1 parent d8bc336 commit adfa9f9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 34 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ linters:
fast: false
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
Expand All @@ -39,13 +38,11 @@ linters:
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- prealloc
- predeclared
Expand Down
1 change: 1 addition & 0 deletions kanban/gen/banner.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package main generates banner.go
package main

import (
Expand Down
4 changes: 3 additions & 1 deletion plugin/hyaku/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package hyaku 百人一首

//nolint: asciicheck

package hyaku

import (
Expand All @@ -23,7 +26,6 @@ import (

const bed = "https://gitcode.net/u011570312/OguraHyakuninIsshu/-/raw/master/"

// nolint: asciicheck
type line struct {
番号, 歌人, 上の句, 下の句, 上の句ひらがな, 下の句ひらがな string
}
Expand Down
21 changes: 3 additions & 18 deletions plugin/qqwife/command.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package qqwife 娶群友 基于“翻牌”和江林大佬的“群老婆”插件魔改作品,文案采用了Hana的zbp娶群友文案

//nolint: asciicheck

package qqwife

import (
Expand Down Expand Up @@ -29,8 +32,6 @@ import (
// 货币系统
)

// nolint: asciicheck
//nolint: asciicheck
type 婚姻登记 struct {
db *sql.Sqlite
sync.RWMutex
Expand All @@ -56,8 +57,6 @@ type userinfo struct {
}

var (
// nolint: asciicheck
//nolint: asciicheck
民政局 = &婚姻登记{
db: &sql.Sqlite{},
}
Expand Down Expand Up @@ -301,8 +300,6 @@ func init() {
})
}

// nolint: asciicheck
//nolint: asciicheck
func (sql *婚姻登记) 查看设置(gid int64) (dbinfo updateinfo, err error) {
sql.Lock()
defer sql.Unlock()
Expand All @@ -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 {
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 3 additions & 4 deletions plugin/qqwife/favorSystem.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//nolint: asciicheck

package qqwife

import (
Expand All @@ -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"
Expand Down Expand Up @@ -192,8 +195,6 @@ func init() {
})
}

// nolint: asciicheck
//nolint: asciicheck
func (sql *婚姻登记) 查好感度(uid, target int64) (int, error) {
sql.Lock()
defer sql.Unlock()
Expand Down Expand Up @@ -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()
Expand Down
10 changes: 2 additions & 8 deletions plugin/qqwife/function.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//nolint: asciicheck

package qqwife

import (
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit adfa9f9

Please sign in to comment.