Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
6235bf50
Commit
6235bf50
authored
May 16, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(helm): print msg and exit when list has no results
parent
5e1ef0ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
list.go
cmd/helm/list.go
+7
-0
No files found.
cmd/helm/list.go
View file @
6235bf50
package
main
package
main
import
(
import
(
"errors"
"fmt"
"fmt"
"strings"
"strings"
...
@@ -62,6 +63,8 @@ func init() {
...
@@ -62,6 +63,8 @@ func init() {
RootCommand
.
AddCommand
(
listCommand
)
RootCommand
.
AddCommand
(
listCommand
)
}
}
var
errListNoReleases
=
errors
.
New
(
"no releases found"
)
func
listCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
func
listCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
var
filter
string
var
filter
string
if
len
(
args
)
>
0
{
if
len
(
args
)
>
0
{
...
@@ -83,6 +86,10 @@ func listCmd(cmd *cobra.Command, args []string) error {
...
@@ -83,6 +86,10 @@ func listCmd(cmd *cobra.Command, args []string) error {
return
prettyError
(
err
)
return
prettyError
(
err
)
}
}
if
len
(
res
.
Releases
)
==
0
{
return
errListNoReleases
}
if
res
.
Next
!=
""
{
if
res
.
Next
!=
""
{
fmt
.
Printf
(
"
\t
next: %s"
,
res
.
Next
)
fmt
.
Printf
(
"
\t
next: %s"
,
res
.
Next
)
}
}
...
...
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