Files
go-garth-cli/python-garmin-connect/connect/nzf.go
2025-09-21 11:03:52 -07:00

17 lines
231 B
Go

package main
import (
"fmt"
)
// nzf is a type that will print "-" instead of 0.0 when used as a stringer.
type nzf float64
func (nzf nzf) String() string {
if nzf != 0.0 {
return fmt.Sprintf("%.01f", nzf)
}
return "-"
}