From aac6ece6d269f3ceb71e4049c359c71603e5de65 Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Thu, 15 Oct 2020 18:10:17 -0400 Subject: [PATCH] kvserver: implement Liveness.String() on value receiver The usual problem with only the pointer implementing Stringer. Particularly important since NodeLiveness.GetLivenes() returns a value Liveness. It used to be implemented on values, but that changed in #50329 for some reason. Release note: None --- pkg/kv/kvserver/kvserverpb/liveness.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/kvserverpb/liveness.go b/pkg/kv/kvserver/kvserverpb/liveness.go index 04c4fee8cc2b..42a8621303c8 100644 --- a/pkg/kv/kvserver/kvserverpb/liveness.go +++ b/pkg/kv/kvserver/kvserverpb/liveness.go @@ -62,7 +62,7 @@ func (l *Liveness) Compare(o Liveness) int { return 0 } -func (l *Liveness) String() string { +func (l Liveness) String() string { var extra string if l.Draining || l.Membership.Decommissioning() || l.Membership.Decommissioned() { extra = fmt.Sprintf(" drain:%t membership:%s", l.Draining, l.Membership.String())