This commit is contained in:
Ilia Denisov
2025-09-03 18:43:28 +03:00
commit 31957206b8
40 changed files with 2947 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package puzzle
import (
"os/exec"
"runtime"
)
func openURL(url string) error {
var cmd string
var args []string
switch runtime.GOOS {
case "windows":
cmd = "rundll32"
args = []string{"url.dll,FileProtocolHandler", url}
case "darwin":
cmd = "open"
args = []string{url}
default:
cmd = "xdg-open"
args = []string{url}
}
return exec.Command(cmd, args...).Start()
}