From 914327de85c21e6e01b5b3ce9f82314590de104a Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Tue, 27 Jun 2023 16:13:13 +0200 Subject: [PATCH] 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. --- density.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/density.go b/density.go index b336eb3..6ba6ecb 100644 --- a/density.go +++ b/density.go @@ -10,8 +10,8 @@ import ( "time" ) -// Density is a type wrapper of an WeatherData for holding density -// values in WeatherData +// Density is a type wrapper of WeatherData for holding density +// values in kg/m³ in WeatherData type Density WeatherData // IsAvailable returns true if an Density value was @@ -20,8 +20,7 @@ func (d Density) IsAvailable() bool { return !d.na } -// DateTime returns true if an Density value was -// available at time of query +// DateTime returns the DateTime of the queried Density value func (d Density) DateTime() time.Time { return d.dt }