Implement Stringer for planTableRow

Makes for clearer log messages.
This commit is contained in:
Justin SB 2018-12-27 12:34:57 -05:00
parent b7fb7ec999
commit 3c646a39a1

View File

@ -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 {