From 554949feb7a2665c02170e3cee8e24345824fd71 Mon Sep 17 00:00:00 2001 From: liyp Date: Sun, 1 Sep 2024 20:54:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(pkg):=20=E4=BC=98=E5=8C=96pkg=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workers/pkg.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/workers/pkg.go b/workers/pkg.go index 7be8bb6..cf7ddb8 100644 --- a/workers/pkg.go +++ b/workers/pkg.go @@ -139,15 +139,24 @@ func (a *Pkg) GetMsg() string { msg += "包名:" + searchResult["Name"].(string) + "\n" msg += "版本:" + searchResult["Version"].(string) + "\n" msg += "描述:" + searchResult["Description"].(string) + "\n" - msg += "维护者:" + maintainer + "\n" + msg += "维护者:" + maintainer upstream, ok := searchResult["URL"].(string) if !ok || upstream == "" { upstream = "无" } + coMaintainers, ok := searchResult["CoMaintainers"].([]interface{}) + if ok { + msg += " ( " + for _, coMaintainer := range coMaintainers { + msg += coMaintainer.(string) + " " + } + msg += ")" + } + msg += "\n" msg += "上游:" + upstream + "\n" msg += OutOfDate last_update := time.Unix(int64(searchResult["LastModified"].(float64)), 0).Format("2006-01-02 15:04:05") - msg += "更新时间:" + last_update + msg += "更新时间:" + last_update + "\n" msg += "投票:" + fmt.Sprintf("%.0f", searchResult["NumVotes"].(float64)) + "\n" msg += "AUR 链接:https://aur.archlinux.org/packages/" + searchResult["Name"].(string) + "\n"