Compare commits

..

2 Commits

Author SHA1 Message Date
54610cdbb4 fix #93 crash index template, check nil ptr 2026-07-15 13:48:46 +02:00
T. von Dein
97a509da9e adopt latest golang enhancements (#91) 2026-07-13 14:33:41 +02:00

View File

@@ -51,7 +51,11 @@ func IndexTemplateList(conf *cfg.Config) error {
return fmt.Errorf("failed to unmarshal meta json data: %w", err)
}
table.Entries[idx] = []any{tpl.Name, desc, tpl.IndexTemplate.Priority}
var prio int64
if tpl.IndexTemplate.Priority != nil {
prio = *tpl.IndexTemplate.Priority
}
table.Entries[idx] = []any{tpl.Name, desc, prio}
}
table.Sort()