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
a67255c1
Commit
a67255c1
authored
Jul 18, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure that the template param is the right type before using it
parent
6b78eeca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
printing.go
pkg/kubectl/cmd/util/printing.go
+4
-2
No files found.
pkg/kubectl/cmd/util/printing.go
View file @
a67255c1
...
...
@@ -160,8 +160,10 @@ func extractOutputOptions(cmd *cobra.Command) *printers.OutputOptions {
// templates are logically optional for specifying a format.
// TODO once https://github.com/kubernetes/kubernetes/issues/12668 is fixed, this should fall back to GetFlagString
var
templateFile
string
if
flags
.
Lookup
(
"template"
)
!=
nil
{
templateFile
=
GetFlagString
(
cmd
,
"template"
)
if
flag
:=
flags
.
Lookup
(
"template"
);
flag
!=
nil
{
if
flag
.
Value
.
Type
()
==
"string"
{
templateFile
=
GetFlagString
(
cmd
,
"template"
)
}
}
if
len
(
outputFormat
)
==
0
&&
len
(
templateFile
)
!=
0
{
outputFormat
=
"template"
...
...
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