- rename Go module, binary, systemd unit, PG_DATABASE default, frontend package and docs from shared-album to galo - add theme-aware halo emblem and favicon (new ui-branding capability) - add make build-release (versioned, stripped, static binary) and run the binary from the repo root
31 lines
373 B
Go
31 lines
373 B
Go
package photos
|
|
|
|
import (
|
|
"time"
|
|
|
|
"galo/internal/sqliteutil"
|
|
)
|
|
|
|
func nullIfEmpty(s string) any {
|
|
if s == "" {
|
|
return nil
|
|
}
|
|
return s
|
|
}
|
|
|
|
func nullTime(t *time.Time) any {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return sqliteutil.FormatTime(*t)
|
|
}
|
|
|
|
func nullFloat(f *float64) any {
|
|
if f == nil {
|
|
return nil
|
|
}
|
|
return *f
|
|
}
|
|
|
|
func nowUTC() time.Time { return time.Now().UTC() }
|