Skip to content

Commit

Permalink
enhance: apps/dynatrace: update UpdateDurations()
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Jun 16, 2024
1 parent fb6ca87 commit 8509231
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/dynatrace/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ func UpdateDurations(t *table.Table, toTimeUnit time.Duration, prec int, addSuff
if t == nil {
return table.ErrTableCannotBeNil
}
if prec == 0 {
t.FormatMap[-1] = table.FormatInt
} else {
t.FormatMap[-1] = table.FormatFloat
if !addSuffix {
if prec == 0 {
t.FormatMap[-1] = table.FormatInt
} else {
t.FormatMap[-1] = table.FormatFloat
}
}
return t.FormatColumns(1, -1, func(s string) (string, error) {
s = strings.TrimSpace(s)
Expand Down

0 comments on commit 8509231

Please sign in to comment.