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
bce51cc5
Unverified
Commit
bce51cc5
authored
Nov 01, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70412 from Pingan2017/kubectl-top
code cleanup for kubectl top
parents
7e102de7
eea99941
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
top_node.go
pkg/kubectl/cmd/top/top_node.go
+3
-9
top_pod.go
pkg/kubectl/cmd/top/top_pod.go
+3
-9
No files found.
pkg/kubectl/cmd/top/top_node.go
View file @
bce51cc5
...
...
@@ -106,15 +106,9 @@ func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericclioptio
Long
:
topNodeLong
,
Example
:
topNodeExample
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
if
err
:=
o
.
Complete
(
f
,
cmd
,
args
);
err
!=
nil
{
cmdutil
.
CheckErr
(
err
)
}
if
err
:=
o
.
Validate
();
err
!=
nil
{
cmdutil
.
CheckErr
(
cmdutil
.
UsageErrorf
(
cmd
,
"%v"
,
err
))
}
if
err
:=
o
.
RunTopNode
();
err
!=
nil
{
cmdutil
.
CheckErr
(
err
)
}
cmdutil
.
CheckErr
(
o
.
Complete
(
f
,
cmd
,
args
))
cmdutil
.
CheckErr
(
o
.
Validate
())
cmdutil
.
CheckErr
(
o
.
RunTopNode
())
},
Aliases
:
[]
string
{
"nodes"
,
"no"
},
}
...
...
pkg/kubectl/cmd/top/top_pod.go
View file @
bce51cc5
...
...
@@ -95,15 +95,9 @@ func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericclioptions
Long
:
topPodLong
,
Example
:
topPodExample
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
if
err
:=
o
.
Complete
(
f
,
cmd
,
args
);
err
!=
nil
{
cmdutil
.
CheckErr
(
err
)
}
if
err
:=
o
.
Validate
();
err
!=
nil
{
cmdutil
.
CheckErr
(
cmdutil
.
UsageErrorf
(
cmd
,
"%v"
,
err
))
}
if
err
:=
o
.
RunTopPod
();
err
!=
nil
{
cmdutil
.
CheckErr
(
err
)
}
cmdutil
.
CheckErr
(
o
.
Complete
(
f
,
cmd
,
args
))
cmdutil
.
CheckErr
(
o
.
Validate
())
cmdutil
.
CheckErr
(
o
.
RunTopPod
())
},
Aliases
:
[]
string
{
"pods"
,
"po"
},
}
...
...
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