diff --git a/pkg/es/index_template.go b/pkg/es/index_template.go index f67ebc0..1eaed07 100644 --- a/pkg/es/index_template.go +++ b/pkg/es/index_template.go @@ -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()