blob: c257658b1089c055eb6bcd821694f9c3696669f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package browserenv
import "fmt"
// shellArgs are the command and arguments needed to run a string containing
// commands in a shell.
var shellArgs = []string{"cmd", "/c"}
// shell returns a Windows `cmd` shell and "/c" argument.
func shell() (args []string) {
return shellArgs
}
// shellEscapeCommand formats a browser command with url, ensuring url is
// properly shell-escaped.
func shellEscapeCommand(browser, url string) string {
return fmt.Sprintf("%s %s", browser, url)
}
|