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"