From 8d0a4024b76b7e85c0ccede853fc2cdcceea2afb Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 15 Sep 2026 22:32:35 +0200 Subject: check refuses an empty time format; krino.conf(5) corrected from the re-audit --- internal/plan/placeholder.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/plan/placeholder.go') diff --git a/internal/plan/placeholder.go b/internal/plan/placeholder.go index 5922b07..5675e01 100644 --- a/internal/plan/placeholder.go +++ b/internal/plan/placeholder.go @@ -143,6 +143,9 @@ func expandOne(body string, f Facts) (string, error) { // they point at what the config author actually wrote (B3) instead of // hardcoding "mtime" for a {now:...} format error. func strftime(verb, format string, t time.Time) (string, error) { + if format == "" { + return "", fmt.Errorf("{%s:} needs a format, like {%s:%%Y}", verb, verb) + } var b strings.Builder for i := 0; i < len(format); i++ { c := format[i] -- cgit v1.3