From 3c646a39a1c6ee657c4271be9d9c718d750b19b9 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 27 Dec 2018 12:34:57 -0500 Subject: [PATCH] Implement Stringer for planTableRow Makes for clearer log messages. --- plan/plan.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plan/plan.go b/plan/plan.go index 21bf5b677..cdbdf1837 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -17,6 +17,7 @@ limitations under the License. package plan import ( + "fmt" "strings" "github.com/kubernetes-incubator/external-dns/endpoint" @@ -78,6 +79,10 @@ type planTableRow struct { candidates []*endpoint.Endpoint } +func (t planTableRow) String() string { + return fmt.Sprintf("planTableRow{current=%v, candidates=%v}", t.current, t.candidates) +} + func (t planTable) addCurrent(e *endpoint.Endpoint) { dnsName := sanitizeDNSName(e.DNSName) if _, ok := t.rows[dnsName]; !ok {