Skip to content

Commit

Permalink
event: mark FormatMajorVersion as safe from redaction
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AlexTalks authored and jbowens committed Oct 11, 2023
1 parent 36b3f57 commit ede31f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions format_major_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ede31f1

Please sign in to comment.