diff --git a/internal/homepage/icon_url.go b/internal/homepage/icon_url.go index c1c23392..9ee07e33 100644 --- a/internal/homepage/icon_url.go +++ b/internal/homepage/icon_url.go @@ -9,9 +9,10 @@ import ( type ( IconURL struct { - FullURL *string `json:"value,omitempty"` // only for absolute/relative icons - Extra *IconExtra `json:"extra,omitempty"` // only for walkxcode/selfhst icons IconSource `json:"source"` + + FullURL *string `json:"value,omitempty"` // only for absolute/relative icons + Extra *IconExtra `json:"extra,omitempty"` // only for walkxcode/selfhst icons } IconExtra struct { diff --git a/internal/homepage/list_icons.go b/internal/homepage/list_icons.go index a38edf74..8344a11f 100644 --- a/internal/homepage/list_icons.go +++ b/internal/homepage/list_icons.go @@ -33,9 +33,10 @@ type ( Tag string `json:"-"` } IconMetaSearch struct { + *IconMeta + Source IconSource `json:"Source"` Ref string `json:"Ref"` - *IconMeta rank int } diff --git a/internal/idlewatcher/provider/proxmox.go b/internal/idlewatcher/provider/proxmox.go index 993fabe2..8a0c24bb 100644 --- a/internal/idlewatcher/provider/proxmox.go +++ b/internal/idlewatcher/provider/proxmox.go @@ -15,6 +15,7 @@ import ( type ProxmoxProvider struct { *proxmox.Node + vmid int lxcName string running bool diff --git a/internal/idlewatcher/watcher.go b/internal/idlewatcher/watcher.go index 775399e3..b7052e17 100644 --- a/internal/idlewatcher/watcher.go +++ b/internal/idlewatcher/watcher.go @@ -67,6 +67,7 @@ type ( dependency struct { *Watcher + waitHealthy bool } diff --git a/internal/logging/accesslog/rotate.go b/internal/logging/accesslog/rotate.go index cc60387e..57057795 100644 --- a/internal/logging/accesslog/rotate.go +++ b/internal/logging/accesslog/rotate.go @@ -99,13 +99,14 @@ func rotateLogFileByPolicy(file supportRotate, config *Retention) (result *Rotat var shouldStop func() bool t := utils.TimeNow() - if config.Last > 0 { + switch { + case config.Last > 0: shouldStop = func() bool { return result.NumLinesKeep-result.NumLinesInvalid == int(config.Last) } // not needed to parse time for last N lines - } else if config.Days > 0 { + case config.Days > 0: cutoff := utils.TimeNow().AddDate(0, 0, -int(config.Days)+1) shouldStop = func() bool { return t.Before(cutoff) } - } else { + default: return nil, nil // should not happen } diff --git a/internal/route/routes/context.go b/internal/route/routes/context.go index 9182145e..a5bead0a 100644 --- a/internal/route/routes/context.go +++ b/internal/route/routes/context.go @@ -18,6 +18,7 @@ type RouteContextKey struct{} type RouteContext struct { context.Context + Route types.HTTPRoute }