Skip to content

Commit

Permalink
kvflowcontrolpb: fix SafeFormat redaction
Browse files Browse the repository at this point in the history
Epic: none
Release note: none
  • Loading branch information
pav-kv committed Dec 19, 2024
1 parent 95460dd commit b1253a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/util/admission/admissionpb/admissionpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (w WorkPriority) String() string {
// SafeFormat implements the redact.SafeFormatter interface.
func (w WorkPriority) SafeFormat(p redact.SafePrinter, verb rune) {
if s, ok := WorkPriorityDict[w]; ok {
p.Print(s)
p.SafeString(redact.SafeString(s))
return
}
p.Printf("custom-pri=%d", int8(w))
Expand Down Expand Up @@ -232,11 +232,11 @@ func (w WorkClass) String() string {
func (w WorkClass) SafeFormat(p redact.SafePrinter, verb rune) {
switch w {
case RegularWorkClass:
p.Printf("regular")
p.SafeString("regular")
case ElasticWorkClass:
p.Printf("elastic")
p.SafeString("elastic")
default:
p.Printf("<unknown-class>")
p.SafeString("<unknown-class>")
}
}

Expand Down

0 comments on commit b1253a8

Please sign in to comment.