Skip to content

Commit

Permalink
Fix some internal names
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Dec 5, 2021
1 parent dcef86d commit 2ccfbf6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions funcr/funcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,16 @@ func NewFormatterJSON(opts Options) Formatter {
return newFormatter(opts, outputJSON)
}

const defaultTimestampFmt = "2006-01-02 15:04:05.000000"
const defaultMaxDepth = 16
// Defaults for Options.
const defaultTimestampFormat = "2006-01-02 15:04:05.000000"
const defaultMaxLogDepth = 16

func newFormatter(opts Options, outfmt outputFormat) Formatter {
if opts.TimestampFormat == "" {
opts.TimestampFormat = defaultTimestampFmt
opts.TimestampFormat = defaultTimestampFormat
}
if opts.MaxLogDepth == 0 {
opts.MaxLogDepth = defaultMaxDepth
opts.MaxLogDepth = defaultMaxLogDepth
}
f := Formatter{
outputFormat: outfmt,
Expand Down

0 comments on commit 2ccfbf6

Please sign in to comment.