Skip to content

Commit

Permalink
Clarify variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
awoodbeck committed May 31, 2021
1 parent a2fcb5f commit fb5705a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions smtpdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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
)
Expand All @@ -56,7 +56,7 @@ func main() {
if smtpd.Debug {
*verbose = true

if !*color {
if !*colorize {
readPrintf = fmt.Printf
writePrintf = fmt.Printf
}
Expand Down

0 comments on commit fb5705a

Please sign in to comment.