]> git.giacomolli.uk - onechat/blobdiff - daemon_log.go
Bind external events to permanent agent IDs
[onechat] / daemon_log.go
index 771fef49a054a20d1761cd3aad2f1ef284f65c36..1ff6aa4efb5a87c6e0b5c66bc83fc5e9bba94cbe 100644 (file)
@@ -138,15 +138,15 @@ func daemonLogAttr(line *strings.Builder, group string, attr slog.Attr, cause *s
        line.WriteByte('=')
 
        if attr.Value.Kind() == slog.KindDuration {
-               line.WriteString(durationText(attr.Value.Duration()))
+               line.WriteString(daemonLogDuration(attr.Value.Duration()))
        } else {
                fmt.Fprint(line, attr.Value.Any())
        }
 }
 
-// durationText returns d for a log line: rounded to the second, or to the
+// daemonLogDuration returns d for a log line: rounded to the second, or to the
 // millisecond when it is shorter than a second.
-func durationText(d time.Duration) string {
+func daemonLogDuration(d time.Duration) string {
        if d < time.Second {
                return d.Round(time.Millisecond).String()
        }