MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / OpenBrowser

Function OpenBrowser

tsunami/util/util.go:81–102  ·  view source on GitHub ↗
(url string, delay time.Duration)

Source from the content-addressed store, hash-verified

79}
80
81func OpenBrowser(url string, delay time.Duration) {
82 if delay > 0 {
83 time.Sleep(delay)
84 }
85
86 var cmd string
87 var args []string
88
89 switch runtime.GOOS {
90 case "windows":
91 cmd = "cmd"
92 args = []string{"/c", "start", url}
93 case "darwin":
94 cmd = "open"
95 args = []string{url}
96 default: // "linux", "freebsd", "openbsd", "netbsd"
97 cmd = "xdg-open"
98 args = []string{url}
99 }
100
101 exec.Command(cmd, args...).Start()
102}
103
104func GetTypedAtomValue[T any](rawVal any, atomName string) T {
105 var result T

Callers

nothing calls this directly

Calls 1

StartMethod · 0.65

Tested by

no test coverage detected