From 503789350801b44790ebc502c9565e499270b665 Mon Sep 17 00:00:00 2001 From: Guoliang Wang Date: Wed, 30 May 2018 18:18:58 +0800 Subject: [PATCH] replace fmt.Sprintf(%s, i.Type()) with i.Type().String() Kubernetes-commit: 17ad3eaa26b4ecf2759eadb01ab91af6ae292a3c --- util/jsonpath/node.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/jsonpath/node.go b/util/jsonpath/node.go index bc763357..2f612b18 100644 --- a/util/jsonpath/node.go +++ b/util/jsonpath/node.go @@ -80,7 +80,7 @@ func (l *ListNode) append(n Node) { } func (l *ListNode) String() string { - return fmt.Sprintf("%s", l.Type()) + return l.Type().String() } // TextNode holds plain text. @@ -210,7 +210,7 @@ func newWildcard() *WildcardNode { } func (i *WildcardNode) String() string { - return fmt.Sprintf("%s", i.Type()) + return i.Type().String() } // RecursiveNode means a recursive descent operator @@ -223,7 +223,7 @@ func newRecursive() *RecursiveNode { } func (r *RecursiveNode) String() string { - return fmt.Sprintf("%s", r.Type()) + return r.Type().String() } // UnionNode is union of ListNode @@ -237,7 +237,7 @@ func newUnion(nodes []*ListNode) *UnionNode { } func (u *UnionNode) String() string { - return fmt.Sprintf("%s", u.Type()) + return u.Type().String() } // BoolNode holds bool value