refactor: move browser open into shared modules

This commit is contained in:
2025-11-04 17:21:23 +01:00
parent fa3d5198d2
commit 4ebac7d7fc
7 changed files with 91 additions and 56 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"plg-mudics/display/pkg"
"plg-mudics/display/web"
"plg-mudics/shared"
)
const VERSION = "0.1.0"
@@ -25,7 +26,7 @@ func main() {
go web.StartWebServer(VERSION)
err = pkg.OpenBrowserWindow("http://127.0.0.1:1323")
err = shared.OpenBrowserWindow("https://example.com", true, true)
if err != nil {
slog.Error("Failed to open browser window", "error", err)
os.Exit(1)