From 9eee8e60bee801e6e904456225306c959510a11b Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 9 May 2025 23:22:12 +0200 Subject: [PATCH] change utils Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- utils.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index 989c5e3..0e5690c 100644 --- a/utils.go +++ b/utils.go @@ -83,11 +83,15 @@ func FetchGitHubAPI(github *github.Client, token, path string) ([]byte, error) { return bodyBytes, nil } -func PrintInfo(key, value string) { +func PrintInfo(key, value string, more ...string) { if value == "" || value == "0" || value == "0001-01-01 00:00:00 +0000 UTC" { return } - fmt.Printf("%s %s\n", GreyStyle.Render(key+":"), GreenStyle.Render(value)) + fmt.Printf("%s %s", GreyStyle.Render(key+":"), GreenStyle.Render(value)) + if len(more) > 0 { + fmt.Printf(" %s", GreyStyle.Render("("+strings.Join(more, ", ")+")")) + } + fmt.Println() } func WaitForRateLimit(resp *github.Response) {