Commit ff845df3 authored by Ville Aikas's avatar Ville Aikas

Merge pull request #783 from vaikas-google/master

Do not return an error if no matches found
parents 801c41c3 84055049
package main
import (
"errors"
"fmt"
"strings"
......@@ -64,8 +63,6 @@ func init() {
RootCommand.AddCommand(listCommand)
}
var errListNoReleases = errors.New("no releases found")
func listCmd(cmd *cobra.Command, args []string) error {
var filter string
if len(args) > 0 {
......@@ -88,7 +85,7 @@ func listCmd(cmd *cobra.Command, args []string) error {
}
if len(res.Releases) == 0 {
return errListNoReleases
return nil
}
if res.Next != "" {
......
......@@ -35,8 +35,6 @@ func search(cmd *cobra.Command, args []string) error {
for _, result := range results {
fmt.Println(result)
}
} else {
return errors.New("No matches found")
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment