adjust float formatting

This commit is contained in:
filifa 2024-05-25 23:12:50 -05:00
parent 9f5895a1a2
commit 4ca00c667f
1 changed files with 6 additions and 6 deletions

View File

@ -95,12 +95,12 @@ type activity struct {
func (a *activity) Attributes() []encoding.Attribute {
return []encoding.Attribute{
{"DUR", strconv.FormatFloat(a.duration, 'g', -1, 64)},
{"ES", strconv.FormatFloat(a.earlyStart, 'g', -1, 64)},
{"EF", strconv.FormatFloat(a.earlyFinish, 'g', -1, 64)},
{"LS", strconv.FormatFloat(a.lateStart, 'g', -1, 64)},
{"LF", strconv.FormatFloat(a.lateFinish, 'g', -1, 64)},
{"SLACK", strconv.FormatFloat(a.slack, 'g', -1, 64)},
{"DUR", strconv.FormatFloat(a.duration, 'f', 2, 64)},
{"ES", strconv.FormatFloat(a.earlyStart, 'f', 2, 64)},
{"EF", strconv.FormatFloat(a.earlyFinish, 'f', 2, 64)},
{"LS", strconv.FormatFloat(a.lateStart, 'f', 2, 64)},
{"LF", strconv.FormatFloat(a.lateFinish, 'f', 2, 64)},
{"SLACK", strconv.FormatFloat(a.slack, 'f', 2, 64)},
}
}