Made forecast-period conditionCode optional
This commit is contained in:
@@ -5,6 +5,8 @@ package presenter
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"gitea.maximumdirect.net/ejr/weatherfeeder/model"
|
||||
)
|
||||
|
||||
func celsiusToFahrenheitPtr(v *float64) *float64 {
|
||||
@@ -47,6 +49,14 @@ func copyTimePtr(v *time.Time) *time.Time {
|
||||
return &out
|
||||
}
|
||||
|
||||
func copyWMOCodePtr(v *model.WMOCode) *model.WMOCode {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
out := *v
|
||||
return &out
|
||||
}
|
||||
|
||||
func inLocationTime(v time.Time, loc *time.Location) time.Time {
|
||||
if loc == nil {
|
||||
return v
|
||||
|
||||
Reference in New Issue
Block a user