Updated deps, go.19 migration, nginx template work

This commit is contained in:
Jamie Curnow
2022-11-08 10:03:45 +10:00
parent 8d37f5df8d
commit c00b690ed3
23 changed files with 375 additions and 376 deletions

View File

@ -52,3 +52,21 @@ func (d NullableDBDate) MarshalJSON() ([]byte, error) {
return json.Marshal(d.Time.Unix())
}
// AsInt64 will attempt to return a unixtime
func (d NullableDBDate) AsInt64() int64 {
if d.Time == nil || d.Time.IsZero() {
return 0
}
return d.Time.Unix()
}
// AsString returns date as a string
func (d NullableDBDate) AsString() string {
if d.Time == nil || d.Time.IsZero() {
return ""
}
return d.Time.String()
}