...

Source file src/github.com/amenzhinsky/go-memexec/testdata/main.go

Documentation: github.com/amenzhinsky/go-memexec/testdata

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"os"
     6  	"strings"
     7  
     8  	"github.com/amenzhinsky/go-memexec/testdata/python3"
     9  )
    10  
    11  func main() {
    12  	exe, err := python3.New()
    13  	if err != nil {
    14  		panic(err)
    15  	}
    16  	c := exe.Command(os.Args[1:]...)
    17  	c.Stdin = os.Stdin
    18  	b, err := c.CombinedOutput()
    19  	if err != nil {
    20  		panic(err)
    21  	}
    22  	fmt.Print(strings.TrimSpace(string(b)))
    23  }
    24  

View as plain text