Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
17ad3eaa
Commit
17ad3eaa
authored
May 30, 2018
by
Guoliang Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace fmt.Sprintf(%s, i.Type()) with i.Type().String()
parent
15cd3552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
errors.go
...c/k8s.io/apimachinery/pkg/util/validation/field/errors.go
+1
-1
node.go
staging/src/k8s.io/client-go/util/jsonpath/node.go
+4
-4
No files found.
staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go
View file @
17ad3eaa
...
@@ -48,7 +48,7 @@ func (v *Error) ErrorBody() string {
...
@@ -48,7 +48,7 @@ func (v *Error) ErrorBody() string {
var
s
string
var
s
string
switch
v
.
Type
{
switch
v
.
Type
{
case
ErrorTypeRequired
,
ErrorTypeForbidden
,
ErrorTypeTooLong
,
ErrorTypeInternal
:
case
ErrorTypeRequired
,
ErrorTypeForbidden
,
ErrorTypeTooLong
,
ErrorTypeInternal
:
s
=
fmt
.
Sprintf
(
"%s"
,
v
.
Type
)
s
=
v
.
Type
.
String
(
)
default
:
default
:
value
:=
v
.
BadValue
value
:=
v
.
BadValue
valueType
:=
reflect
.
TypeOf
(
value
)
valueType
:=
reflect
.
TypeOf
(
value
)
...
...
staging/src/k8s.io/client-go/util/jsonpath/node.go
View file @
17ad3eaa
...
@@ -80,7 +80,7 @@ func (l *ListNode) append(n Node) {
...
@@ -80,7 +80,7 @@ func (l *ListNode) append(n Node) {
}
}
func
(
l
*
ListNode
)
String
()
string
{
func
(
l
*
ListNode
)
String
()
string
{
return
fmt
.
Sprintf
(
"%s"
,
l
.
Type
()
)
return
l
.
Type
()
.
String
(
)
}
}
// TextNode holds plain text.
// TextNode holds plain text.
...
@@ -210,7 +210,7 @@ func newWildcard() *WildcardNode {
...
@@ -210,7 +210,7 @@ func newWildcard() *WildcardNode {
}
}
func
(
i
*
WildcardNode
)
String
()
string
{
func
(
i
*
WildcardNode
)
String
()
string
{
return
fmt
.
Sprintf
(
"%s"
,
i
.
Type
()
)
return
i
.
Type
()
.
String
(
)
}
}
// RecursiveNode means a recursive descent operator
// RecursiveNode means a recursive descent operator
...
@@ -223,7 +223,7 @@ func newRecursive() *RecursiveNode {
...
@@ -223,7 +223,7 @@ func newRecursive() *RecursiveNode {
}
}
func
(
r
*
RecursiveNode
)
String
()
string
{
func
(
r
*
RecursiveNode
)
String
()
string
{
return
fmt
.
Sprintf
(
"%s"
,
r
.
Type
()
)
return
r
.
Type
()
.
String
(
)
}
}
// UnionNode is union of ListNode
// UnionNode is union of ListNode
...
@@ -237,7 +237,7 @@ func newUnion(nodes []*ListNode) *UnionNode {
...
@@ -237,7 +237,7 @@ func newUnion(nodes []*ListNode) *UnionNode {
}
}
func
(
u
*
UnionNode
)
String
()
string
{
func
(
u
*
UnionNode
)
String
()
string
{
return
fmt
.
Sprintf
(
"%s"
,
u
.
Type
()
)
return
u
.
Type
()
.
String
(
)
}
}
// BoolNode holds bool value
// BoolNode holds bool value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment