如何解决?(OSX 10.10.2, go 版本 go1.4.2 darwin/amd64)
错误:
cmd.Start 未定义(字符串类型没有字段或方法 Start)
代码:
myos := runtime.GOOS;
myarch := runtime.GOARCH;
const url = "http://localhsot:9090"
if myarch == "386" {
cmd := exec.Command("open", "-b" , "com.google.Chrome", "--args", "--chrome-frame", "--kiosk", url);
} else {
cmd := exec.Command("open", "-b" , "com.google.Chrome", "--args", "--chrome-frame", "--kiosk", url);
}
err := cmd.Start();
if err != nil {
fmt.Println("failed");
}
相关分类