From 320312d75435686f21b6c28e2da1f56834254100 Mon Sep 17 00:00:00 2001 From: Jiang-Red <79574799+Jiang-Red@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:38:11 +0800 Subject: [PATCH] public --- serverpic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serverpic.go b/serverpic.go index a704b11..915e07f 100644 --- a/serverpic.go +++ b/serverpic.go @@ -17,7 +17,7 @@ type PluginInfo struct { } // RenderServerPic ... -func RenderServerPic(pluginlist []*plugininfo, torussd, glowsd []byte, zbplogopath string, serverlistlogo image.Image) (img image.Image, err error) { +func RenderServerPic(pluginlist []*PluginInfo, torussd, glowsd []byte, zbplogopath string, serverlistlogo image.Image) (img image.Image, err error) { logo, err := gg.LoadImage(zbplogopath) if err != nil { return @@ -94,7 +94,7 @@ func RenderServerPic(pluginlist []*plugininfo, torussd, glowsd []byte, zbplogopa for i := 0; i < 3; i++ { a := i * cardsnum b := (i + 1) * cardsnum - go func(i int, list []*plugininfo) { + go func(i int, list []*PluginInfo) { defer wg.Done() cardimgs[i], err = renderinfocards(torussd, glowsd, list) if err != nil { @@ -120,7 +120,7 @@ func RenderServerPic(pluginlist []*plugininfo, torussd, glowsd []byte, zbplogopa return } -func renderinfocards(torussd, glowsd []byte, plugininfos []*plugininfo) (img image.Image, err error) { +func renderinfocards(torussd, glowsd []byte, plugininfos []*PluginInfo) (img image.Image, err error) { w := (290+24)*3 + 24 cardnum := len(plugininfos) h := math.Ceil(cardnum, 3) * (80 + 16)