else dropped
This commit is contained in:
parent
b8e728cfd1
commit
965081e440
@ -22,14 +22,15 @@ func init() {
|
|||||||
|
|
||||||
// Open a url in the default browser
|
// Open a url in the default browser
|
||||||
func Open(url string) (io.Writer, error) {
|
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.")
|
return nil, errors.New("This operating system is not supported.")
|
||||||
} else {
|
}
|
||||||
cmd := exec.Command(open, url)
|
cmd := exec.Command(open, url)
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return cmd.Stderr, err
|
return cmd.Stderr, err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user