Skip to content

Commit 62a40cc

Browse files
committed
Exit when error occured
1 parent 43f173a commit 62a40cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

search.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
package main
22

33
import (
4-
// "fmt"
4+
"fmt"
55
"github.com/codegangsta/cli"
66
"github.com/pascalw/go-alfred"
77
"github.com/uetchy/go-qiita/qiita"
8+
"os"
89
"strings"
910
)
1011

1112
func cmdSearch(c *cli.Context) {
1213
query := strings.Join(c.Args(), " ")
1314
client, err := newQiitaClient()
1415
if err != nil {
15-
return
16+
fmt.Println(err)
17+
os.Exit(1)
1618
}
1719

1820
items, _, _ := client.Items.List(&qiita.ItemsListOptions{Query: query})

0 commit comments

Comments
 (0)