From fb5705aa8ba1982ca02f5e07ca4e17a24a361a76 Mon Sep 17 00:00:00 2001 From: Adam Woodbeck Date: Mon, 31 May 2021 11:32:07 -0400 Subject: [PATCH] Clarify variable names --- smtpdump.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smtpdump.go b/smtpdump.go index 1117810..9218cb2 100644 --- a/smtpdump.go +++ b/smtpdump.go @@ -14,14 +14,14 @@ import ( "strings" "time" - c "github.com/fatih/color" + "github.com/fatih/color" "github.com/mhale/smtpd" ) var ( addr = flag.String("addr", "127.0.0.1:2525", "Listen address:port") cert = flag.String("cert", "", "PEM-encoded certificate") - color = flag.Bool("color", true, "color debug output") + colorize = flag.Bool("color", true, "colorize debug output") discard = flag.Bool("discard", false, "discard incoming messages") extension = flag.String("extension", "eml", "Saved file extension") output = flag.String("output", "", "Output directory (default to current directory)") @@ -31,8 +31,8 @@ var ( pkey = flag.String("key", "", "PEM-encoded private key") verbose = flag.Bool("verbose", false, "verbose output") - readPrintf = c.New(c.FgGreen).Printf - writePrintf = c.New(c.FgCyan).Printf + readPrintf = color.New(color.FgGreen).Printf + writePrintf = color.New(color.FgCyan).Printf hostname string ) @@ -56,7 +56,7 @@ func main() { if smtpd.Debug { *verbose = true - if !*color { + if !*colorize { readPrintf = fmt.Printf writePrintf = fmt.Printf }