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