package temperature import "time" type TemperatureReading struct { Sensor string Time time.Time MilliDegrees int64 } func (t *TemperatureReading) Degrees() float64 { return float64(t.MilliDegrees) / 1000.0 }