diff options
| author | Paul Buetow <paul@buetow.org> | 2025-01-06 22:32:36 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-01-06 22:32:36 +0200 |
| commit | b9beca8449a10ba53807ecfc7d4b15cb6f14e82e (patch) | |
| tree | 4fbb030ff4e7d686b642e4a0bac90362597f07d5 /internal/colour | |
| parent | 4b34876fb23e42dcc1d9414cafa367147de42ad7 (diff) | |
refactor colors a bit
Diffstat (limited to 'internal/colour')
| -rw-r--r-- | internal/colour/colour.go | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/internal/colour/colour.go b/internal/colour/colour.go index b5f2681..5cefc58 100644 --- a/internal/colour/colour.go +++ b/internal/colour/colour.go @@ -7,14 +7,28 @@ import ( ) var ( - // infoCol = color.New(color.FgCyan, color.BgBlue, color.Bold) - Infof = func(format string, args ...any) { fmt.Printf(format, args...) } - Infoln = func(args ...any) { fmt.Println(args...) } + Infof = func(format string, args ...any) { + fmt.Printf(format, args...) + fmt.Print("\n") + } + Infoln = func(args ...any) { fmt.Println(args...) } + info2Col = color.New(color.FgHiYellow, color.BgBlue) - Info2f = info2Col.PrintfFunc() - SInfo2f = info2Col.SprintfFunc() - Ackf = color.New(color.FgBlack, color.BgHiYellow, color.Bold).PrintfFunc() - warnCol = color.New(color.FgHiWhite, color.BgRed) - Warnf = warnCol.PrintfFunc() - Successf = color.New(color.FgWhite, color.BgGreen).PrintfFunc() + Info2f = func(format string, args ...any) { + info2Col.Printf(format, args...) + fmt.Print("\n") + } + SInfo2f = info2Col.SprintfFunc() + + warnCol = color.New(color.FgHiWhite, color.BgRed) + Warnln = warnCol.PrintlnFunc() + + successCol = color.New(color.FgWhite, color.BgGreen) + Successf = func(format string, args ...any) { + successCol.Printf(format, args...) + fmt.Print("\n") + + } + + Ackf = color.New(color.FgBlack, color.BgHiYellow, color.Bold).PrintfFunc() ) |
