Skip to content

Commit a02e6d9

Browse files
committed
chore: make lint happy
1 parent fadf59a commit a02e6d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/cybercat/catdata.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ type catInfo struct {
6464
Picurl string // 猫猫图片
6565
}
6666

67-
func (c *catInfo) avatar(gid int64) string {
67+
func (inf *catInfo) avatar(gid int64) string {
6868
cache := path.Join(engine.DataFolder(), "cache")
69-
imgname := fmt.Sprintf("%d_%d", c.User, gid)
70-
imgfile := filepath.Join(cache, c.Type+imgname+".png")
69+
imgname := fmt.Sprintf("%d_%d", inf.User, gid)
70+
imgfile := filepath.Join(cache, inf.Type+imgname+".png")
7171
aimgfile := filepath.Join(file.BOTPATH, imgfile)
7272

7373
if _, err := os.Stat(cache); os.IsNotExist(err) {
@@ -78,7 +78,7 @@ func (c *catInfo) avatar(gid int64) string {
7878
}
7979
}
8080
if file.IsNotExist(aimgfile) {
81-
breed := c.Type
81+
breed := inf.Type
8282
data, err := web.GetData(apiURL + "search?has_breeds=" + breed)
8383
if err != nil {
8484
fmt.Println("Error fetching avatar URL:", err)

0 commit comments

Comments
 (0)