Golang 使用 Lorca 报错

Golang 使用 Lorca 错误信息：
websocket.Dial ws://127.0.0.1:51233/devtools/browser/0bfe6d19-b953-4b32-8fed-7a569d2d01cb: bad status
exit status 1

Copy
package main

import (
"log"
"net/url"

"github.com/zserge/lorca"
)

func main() {
// Create UI with basic HTML passed via data URI
ui, err := lorca.New("data:text/html,"+url.PathEscape(`

Hello
Hello, world!

`), "", 480, 320)
if err != nil {
log.Fatal(err)
}
defer ui.Close()
// Wait until UI window is closed
<-ui.Done()
}

参考https://github.com/zserge/lorca/issues/183#issuecomment-1460603663 修改为:

Copy
package main

import (
"log"
"net/url"

"github.com/zserge/lorca"
)

func main() {
// Create UI with basic HTML passed via data URI
ui, err := lorca.New("data:text/html,"+url.PathEscape(`

Hello
Hello, world!

`), "", 480, 320, "--remote-allow-origins=*")
if err != nil {
log.Fatal(err)
}
defer ui.Close()
// Wait until UI window is closed
<-ui.Done()
}