Improve Density type documentation and comments
Update Density type's comments to clarify its purpose and usage, including units and methods, for better code understanding and maintainability.
This commit is contained in:
parent
a10ec1c0f9
commit
914327de85
|
@ -10,8 +10,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Density is a type wrapper of an WeatherData for holding density
|
// Density is a type wrapper of WeatherData for holding density
|
||||||
// values in WeatherData
|
// values in kg/m³ in WeatherData
|
||||||
type Density WeatherData
|
type Density WeatherData
|
||||||
|
|
||||||
// IsAvailable returns true if an Density value was
|
// IsAvailable returns true if an Density value was
|
||||||
|
@ -20,8 +20,7 @@ func (d Density) IsAvailable() bool {
|
||||||
return !d.na
|
return !d.na
|
||||||
}
|
}
|
||||||
|
|
||||||
// DateTime returns true if an Density value was
|
// DateTime returns the DateTime of the queried Density value
|
||||||
// available at time of query
|
|
||||||
func (d Density) DateTime() time.Time {
|
func (d Density) DateTime() time.Time {
|
||||||
return d.dt
|
return d.dt
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue