为什么报错?exit status 64

greatit · · 2449 次点击
代码: ```go package main import ( "fmt" "os/exec" ) func main() { cmd := exec.Command("ping", "-c 1 -W 1", "127.0.0.1") out, err := cmd.Output() if err != nil { fmt.Printf("Command Error", err.Error()) } else { fmt.Printf("%s\n", out) } } ```
#2
更多评论
改成这样 exec.Command("ping", "-c 1", "-W 1", "127.0.0.1")
#1