Skip to content

Commit

Permalink
[#100] Implement the fmt.Stringer interface for the DeletionReason type
Browse files Browse the repository at this point in the history
  • Loading branch information
maypok86 committed Jul 28, 2024
1 parent 4d29749 commit 41748b2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/core/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ const (
Expired
)

func (dc DeletionCause) String() string {
switch dc {
case Explicit:
return "Explicit"
case Replaced:
return "Replaced"
case Size:
return "Size"
case Expired:
return "Expired"
default:
panic("unknown deletion cause")
}
}

const (
minWriteBufferCapacity uint32 = 4
)
Expand Down

0 comments on commit 41748b2

Please sign in to comment.