Skip to content

Commit

Permalink
revert default delim back to space
Browse files Browse the repository at this point in the history
  • Loading branch information
luckman212 committed Apr 29, 2024
1 parent 70fa36c commit 6d6ad16
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 6d6ad16

Please sign in to comment.