Source loads and evaluates the given file(s)
(cmdIO *exec.CmdIO, args ...string)
| 160 | |
| 161 | // Source loads and evaluates the given file(s) |
| 162 | func (sh *Shell) Source(cmdIO *exec.CmdIO, args ...string) error { |
| 163 | if len(args) == 0 { |
| 164 | return fmt.Errorf("cosh source: requires at least one argument") |
| 165 | } |
| 166 | for _, fn := range args { |
| 167 | sh.TranspileCodeFromFile(fn) |
| 168 | } |
| 169 | // note that we do not execute the file -- just loads it in |
| 170 | return nil |
| 171 | } |
| 172 | |
| 173 | // CoSSH manages SSH connections, which are referenced by the @name |
| 174 | // identifier. It handles the following cases: |
no test coverage detected