Refine method comments in humidity.go
Comments for DateTime and Value methods in humidity.go file were updated to better describe their functionalities. This clarification should improve understandability for future maintenance/code reading.
This commit is contained in:
parent
65d065dd59
commit
84ba2feda9
|
@ -20,8 +20,8 @@ func (h Humidity) IsAvailable() bool {
|
||||||
return !h.na
|
return !h.na
|
||||||
}
|
}
|
||||||
|
|
||||||
// DateTime returns true if an Humidity value was
|
// DateTime returns the timestamp of when the humidity
|
||||||
// available at time of query
|
// measurement was taken.
|
||||||
func (h Humidity) DateTime() time.Time {
|
func (h Humidity) DateTime() time.Time {
|
||||||
return h.dt
|
return h.dt
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ func (h Humidity) Source() Source {
|
||||||
|
|
||||||
// Value returns the float64 value of an Humidity
|
// Value returns the float64 value of an Humidity
|
||||||
// If the Humidity is not available in the WeatherData
|
// If the Humidity is not available in the WeatherData
|
||||||
// Vaule will return math.NaN instead.
|
// Value will return math.NaN instead.
|
||||||
func (h Humidity) Value() float64 {
|
func (h Humidity) Value() float64 {
|
||||||
if h.na {
|
if h.na {
|
||||||
return math.NaN()
|
return math.NaN()
|
||||||
|
|
Loading…
Reference in a new issue