package main import ( "os" "os/exec" ) func main() { c := exec.Command("cls") c.Stdout = os.Stdout c.Run() }
和
C.system(C.CString("cls"))
并且转义序列也不起作用
package main import ( "os" "os/exec" ) func main() { c := exec.Command("cls") c.Stdout = os.Stdout c.Run() }
和
C.system(C.CString("cls"))
并且转义序列也不起作用
package main import ( "os" "os/exec" ) func main() { cmd := exec.Command("cmd","/c","cls") cmd.Stdout = os.Stdout cmd.Run() }