Skip to content

Commit

Permalink
testkeys: fix assertion panic message
Browse files Browse the repository at this point in the history
It's okay to call Split on a bare prefix but not a bare suffix.

Informs cockroachdb#3906.
  • Loading branch information
jbowens committed Sep 19, 2024
1 parent c826c0a commit e1e346b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/testkeys/testkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func compare(a, b []byte) int {
func split(a []byte) int {
i := bytes.LastIndexByte(a, suffixDelim)
if i == 0 {
panic("split called on bare prefix")
panic(fmt.Sprintf("Split called on bare suffix %q", a))
}
if i > 0 {
return i
Expand Down

0 comments on commit e1e346b

Please sign in to comment.