From 965081e4402c35bee9608ec72b2dfd7502ae753c Mon Sep 17 00:00:00 2001 From: alessio Date: Sat, 17 Dec 2016 17:20:16 +0100 Subject: [PATCH] else dropped --- server/open.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/server/open.go b/server/open.go index 2bdc697..598b1e0 100644 --- a/server/open.go +++ b/server/open.go @@ -22,14 +22,15 @@ func init() { // Open a url in the default browser func Open(url string) (io.Writer, error) { - if open, err := cmd[runtime.GOOS]; !err { + open, err := cmd[runtime.GOOS]; + if !err { return nil, errors.New("This operating system is not supported.") - } else { - cmd := exec.Command(open, url) - cmd.Stderr = &stderr - if err := cmd.Run(); err != nil { - return cmd.Stderr, err - } } + cmd := exec.Command(open, url) + cmd.Stderr = &stderr + if err := cmd.Run(); err != nil { + return cmd.Stderr, err + } + return nil, nil }