(wg *sync.WaitGroup, fp io.ReadCloser, out func(string, ...interface{}))
| 161 | } |
| 162 | |
| 163 | func logOutput(wg *sync.WaitGroup, fp io.ReadCloser, out func(string, ...interface{})) { |
| 164 | defer wg.Done() |
| 165 | r := bufio.NewReader(fp) |
| 166 | for { |
| 167 | line, _, err := r.ReadLine() |
| 168 | if err != nil { |
| 169 | return |
| 170 | } |
| 171 | out("%s", string(line)) |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // CheckShell checks that a shell is supported, and returns the correct command name |
| 176 | func CheckShell(shell string) (string, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…