From ea30505f4ebc56492709b468bd61030497b534ae Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sun, 29 Jan 2023 21:32:06 -0800 Subject: [PATCH] Add comments for CLILogger --- cli.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli.go b/cli.go index 5c84729..1b989d1 100644 --- a/cli.go +++ b/cli.go @@ -16,6 +16,9 @@ import ( var _ Logger = (*CLILogger)(nil) +// CLILogger is a logger meant to be used for CLI tools +// where users will view and read the logs throughout the +// application's execution type CLILogger struct { Out io.Writer Level LogLevel @@ -35,6 +38,7 @@ type CLILogger struct { PanicColor color.Color } +// NewCLI creates and returns a new CLILogger func NewCLI(out io.Writer) *CLILogger { useColor := false if f, ok := out.(*os.File); ok {