From 6d6ad1656a80befbcf9048475430f325548bd45b Mon Sep 17 00:00:00 2001 From: luckman212 <1992842+luckman212@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:14:39 -0400 Subject: [PATCH] revert default delim back to space --- main.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index c487c00..140ed60 100644 --- a/main.go +++ b/main.go @@ -130,7 +130,7 @@ func main() { var elapsedMode = flag.BoolP("elapsed", "s", false, "show elapsed timestamps") var incrementalMode = flag.BoolP("incremental", "i", false, "show incremental timestamps") var format = flag.StringP("format", "f", "", "show timestamps in this format") - var delim = flag.StringP("delim", "d", "", "delimiter after timestamp, default is \\t (TAB)") + var delim = flag.StringP("delim", "d", " ", "delimiter after timestamp (default is space)") var utc = flag.BoolP("utc", "u", false, "show absolute timestamps in UTC") var timezoneName = flag.StringP("timezone", "z", "", "show absolute timestamps in this timezone, e.g. America/New_York") var color = flag.BoolP("color", "c", false, "show timestamps in color") @@ -216,15 +216,11 @@ Options: *format = "[%T]" } } - if *delim == "" { - *delim = "\t" + s, err := strconv.Unquote(`"` + *delim + `"`) + if err != nil { + log.Fatalf("error parsing delimiter string: %s", err) } else { - s, err := strconv.Unquote(`"` + *delim + `"`) - if err != nil { - log.Fatalf("error parsing delimiter string: %s", err) - } else { - *delim = s - } + *delim = s } timezone := time.Local if *utc && *timezoneName != "" {