Revert "Connecting Mizu to the application (#313)" (#316)

This commit is contained in:
RoyUP9
2021-10-06 10:41:23 +03:00
committed by GitHub
parent d2d4ed5aee
commit 9c98a4c2b1
15 changed files with 35 additions and 286 deletions

View File

@@ -1,27 +0,0 @@
package uiUtils
import (
"fmt"
"github.com/up9inc/mizu/cli/logger"
"os/exec"
"runtime"
)
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 {
logger.Log.Errorf("error while opening browser, %v", err)
}
}