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
8ec61c1d
Commit
8ec61c1d
authored
Aug 29, 2016
by
PingWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return all the invalid parameters for set_image
Signed-off-by:
PingWang
<
wang.ping5@zte.com.cn
>
parent
6fcbbe86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
set_image.go
pkg/kubectl/cmd/set/set_image.go
+5
-4
No files found.
pkg/kubectl/cmd/set/set_image.go
View file @
8ec61c1d
...
@@ -147,15 +147,16 @@ func (o *ImageOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, args []s
...
@@ -147,15 +147,16 @@ func (o *ImageOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, args []s
}
}
func
(
o
*
ImageOptions
)
Validate
()
error
{
func
(
o
*
ImageOptions
)
Validate
()
error
{
errors
:=
[]
error
{}
if
len
(
o
.
Resources
)
<
1
&&
len
(
o
.
Filenames
)
==
0
{
if
len
(
o
.
Resources
)
<
1
&&
len
(
o
.
Filenames
)
==
0
{
return
fmt
.
Errorf
(
"one or more resources must be specified as <resource> <name> or <resource>/<name>"
)
errors
=
append
(
errors
,
fmt
.
Errorf
(
"one or more resources must be specified as <resource> <name> or <resource>/<name>"
)
)
}
}
if
len
(
o
.
ContainerImages
)
<
1
{
if
len
(
o
.
ContainerImages
)
<
1
{
return
fmt
.
Errorf
(
"at least one image update is required"
)
errors
=
append
(
errors
,
fmt
.
Errorf
(
"at least one image update is required"
)
)
}
else
if
len
(
o
.
ContainerImages
)
>
1
&&
hasWildcardKey
(
o
.
ContainerImages
)
{
}
else
if
len
(
o
.
ContainerImages
)
>
1
&&
hasWildcardKey
(
o
.
ContainerImages
)
{
return
fmt
.
Errorf
(
"all containers are already specified by *, but saw more than one container_name=container_image pairs"
)
errors
=
append
(
errors
,
fmt
.
Errorf
(
"all containers are already specified by *, but saw more than one container_name=container_image pairs"
)
)
}
}
return
nil
return
utilerrors
.
NewAggregate
(
errors
)
}
}
func
(
o
*
ImageOptions
)
Run
()
error
{
func
(
o
*
ImageOptions
)
Run
()
error
{
...
...
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