parent
05cdbae1b8
commit
140b15f80c
@ -0,0 +1,15 @@
|
|||||||
|
package ShellUtils
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
module dsSupport
|
||||||
|
|
||||||
|
go 1.14
|
Loading…
Reference in new issue