Lines Matching defs:runCmd
194 type runCmd func(...string) ([]byte, error)
196 func compileFile(runcmd runCmd, longname string) (out []byte, err error) {
197 return runcmd("go", "tool", "compile", "-e", longname)
200 func compileInDir(runcmd runCmd, dir string, names ...string) (out []byte, err error) {
205 return runcmd(cmd...)
208 func linkFile(runcmd runCmd, goname string) (err error) {
210 _, err = runcmd("go", "tool", "link", "-w", "-o", "a.exe", "-L", ".", pfile)
496 runcmd := func(args ...string) ([]byte, error) {
521 out, err := runcmd(cmdline...)
540 _, t.err = compileFile(runcmd, long)
551 _, t.err = compileInDir(runcmd, longdir, gofiles...)
567 out, err := compileInDir(runcmd, longdir, gofiles...)
600 _, err := compileInDir(runcmd, longdir, gofiles...)
606 err = linkFile(runcmd, gofiles[0])
615 out, err := runcmd(cmd...)
627 _, err := runcmd("go", "build", "-o", "a.exe", long)
634 out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
649 out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
659 out, err = runcmd("go", "run", tfile)
670 out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
684 out, err = runcmd(cmdline...)