(cmdLine string)
| 54 | } |
| 55 | |
| 56 | func CmdFromString(cmdLine string) (*exec.Cmd, error) { |
| 57 | args := strings.Fields(cmdLine) |
| 58 | if len(args) < 1 { |
| 59 | return nil, errors.New("empty input") |
| 60 | } |
| 61 | return exec.Command(args[0], args[1:]...), nil |
| 62 | } |
| 63 | |
| 64 | func Main() { |
| 65 | session := NewSession(os.Stdin, os.Stdout, os.Stderr) |