From ede31f1a8e4b0ae024ce7639cf65bd40ca224645 Mon Sep 17 00:00:00 2001 From: Alex Sarkesian Date: Tue, 10 Oct 2023 22:06:25 -0400 Subject: [PATCH] event: mark `FormatMajorVersion` as safe from redaction Previously nearly all events logged by the `EventListener` used types that had been marked as safe by implementing `SafeFormatter`, defining them as non-sensitive and not requiring redaction in logs, however `FormatMajorVersion` had been excluded. This change makes `FormatMajorVersion` a `redact.SafeValue` as well. --- format_major_version.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/format_major_version.go b/format_major_version.go index d5876f6866..baa67cf2bf 100644 --- a/format_major_version.go +++ b/format_major_version.go @@ -28,10 +28,13 @@ import ( // FormatVersion that the default corresponds to may change with time. type FormatMajorVersion uint64 +// SafeValue implements redact.SafeValue. +func (v FormatMajorVersion) SafeValue() {} + // String implements fmt.Stringer. func (v FormatMajorVersion) String() string { - // NB: This must not change. It's used as the value for the the - // on-disk version marker file. + // NB: This must not change. It's used as the value for the on-disk + // version marker file. // // Specifically, this value must always parse as a base 10 integer // that fits in a uint64. We format it as zero-padded, 3-digit