golang执行shell命令,实时输出,支持kill
package cmd
import (
"bufio"
"logger"
"fmt"
"io"
"os/exec"
"sync"
"syscall"
)
type Command struct {
CmdStr string
Pid int
ExitCode int
StdOutput string
ErrOutput string
isPrintRealTime bool
}
var log.
原创
2021-03-26 18:19:57 ·
1664 阅读 ·
0 评论