(cmdLine string)
| 43 | } |
| 44 | |
| 45 | func CmdFromString(cmdLine string) (*exec.Cmd, error) { |
| 46 | args := strings.Fields(cmdLine) |
| 47 | if len(args) < 1 { |
| 48 | return nil, errors.New("empty input") |
| 49 | } |
| 50 | return exec.Command(args[0], args[1:]...), nil |
| 51 | } |
| 52 | |
| 53 | func Main() { |
| 54 | session := NewSession(os.Stdin, os.Stdout, os.Stderr) |