You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package ShellUtil
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
)
|
|
|
|
//封装一个函数来执行命令
|
|
func ExecCommand(cmdLine string) {
|
|
cmd := exec.Command("cmd.exe", "/c", cmdLine)
|
|
err := cmd.Run()
|
|
cmd.Wait()
|
|
fmt.Printf("%s, error:%v \n", cmdLine, err)
|
|
}
|
|
|