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
8326ea71
Unverified
Commit
8326ea71
authored
Feb 25, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74403 from ping035627/k8s-190222
Code cleanup and refactoring
parents
d834885a
8fef7221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
checks.go
cmd/kubeadm/app/preflight/checks.go
+5
-11
No files found.
cmd/kubeadm/app/preflight/checks.go
View file @
8326ea71
...
@@ -1070,7 +1070,7 @@ func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String
...
@@ -1070,7 +1070,7 @@ func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String
Name
string
Name
string
Errors
[]
error
Errors
[]
error
}
}
found
:=
[]
checkErrors
{}
var
errsBuffer
bytes
.
Buffer
for
_
,
c
:=
range
checks
{
for
_
,
c
:=
range
checks
{
name
:=
c
.
Name
()
name
:=
c
.
Name
()
...
@@ -1085,18 +1085,12 @@ func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String
...
@@ -1085,18 +1085,12 @@ func RunChecks(checks []Checker, ww io.Writer, ignorePreflightErrors sets.String
for
_
,
w
:=
range
warnings
{
for
_
,
w
:=
range
warnings
{
io
.
WriteString
(
ww
,
fmt
.
Sprintf
(
"
\t
[WARNING %s]: %v
\n
"
,
name
,
w
))
io
.
WriteString
(
ww
,
fmt
.
Sprintf
(
"
\t
[WARNING %s]: %v
\n
"
,
name
,
w
))
}
}
if
len
(
errs
)
>
0
{
for
_
,
i
:=
range
errs
{
found
=
append
(
found
,
checkErrors
{
Name
:
name
,
Errors
:
errs
}
)
errsBuffer
.
WriteString
(
fmt
.
Sprintf
(
"
\t
[ERROR %s]: %v
\n
"
,
name
,
i
.
Error
())
)
}
}
}
}
if
len
(
found
)
>
0
{
if
errsBuffer
.
Len
()
>
0
{
var
errs
bytes
.
Buffer
return
&
Error
{
Msg
:
errsBuffer
.
String
()}
for
_
,
c
:=
range
found
{
for
_
,
i
:=
range
c
.
Errors
{
errs
.
WriteString
(
fmt
.
Sprintf
(
"
\t
[ERROR %s]: %v
\n
"
,
c
.
Name
,
i
.
Error
()))
}
}
return
&
Error
{
Msg
:
errs
.
String
()}
}
}
return
nil
return
nil
}
}
...
...
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