docs: add comment to explain
parent
ce20881e9d
commit
00ce559b04
4
main.go
4
main.go
|
@ -18,12 +18,16 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runGoTest() int {
|
func runGoTest() int {
|
||||||
|
// Run go test
|
||||||
|
|
||||||
args := []string{"test"}
|
args := []string{"test"}
|
||||||
args = append(args, os.Args[1:]...)
|
args = append(args, os.Args[1:]...)
|
||||||
|
|
||||||
cmd := exec.Command("go", args...)
|
cmd := exec.Command("go", args...)
|
||||||
cmd.Env = os.Environ()
|
cmd.Env = os.Environ()
|
||||||
|
|
||||||
|
// Output pipe and error pipe
|
||||||
|
|
||||||
outReader, outWriter := io.Pipe()
|
outReader, outWriter := io.Pipe()
|
||||||
defer outWriter.Close()
|
defer outWriter.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue