Merge pull request #11 from rumanzo/cleanup

cleanup
This commit is contained in:
Alexey Kostin 2020-04-17 02:08:22 +03:00 committed by GitHub
commit 4e54ce54a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,6 @@ import (
"io/ioutil"
"log"
"os"
"os/exec"
"os/user"
"regexp"
"runtime"
@ -253,24 +252,6 @@ func logic(key string, value map[string]interface{}, flags *Flags, chans *Channe
return nil
}
func openBrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
default:
err = fmt.Errorf("unsupported platform")
}
if err != nil {
log.Fatal(err)
}
}
func main() {
flags := Flags{PathSeparator: string(os.PathSeparator)}
sep := string(os.PathSeparator)