(pipe *syncSocket, expected syncType)
| 170 | } |
| 171 | |
| 172 | func readSync(pipe *syncSocket, expected syncType) error { |
| 173 | sync, err := readSyncFull(pipe, expected) |
| 174 | if err != nil { |
| 175 | return err |
| 176 | } |
| 177 | if sync.Arg != nil { |
| 178 | return fmt.Errorf("sync %v had unexpected argument passed: %q", expected, string(*sync.Arg)) |
| 179 | } |
| 180 | if sync.File != nil { |
| 181 | _ = sync.File.Close() |
| 182 | return fmt.Errorf("sync %v had unexpected file passed", sync.Type) |
| 183 | } |
| 184 | return nil |
| 185 | } |
| 186 | |
| 187 | // parseSync runs the given callback function on each syncT received from the |
| 188 | // child. It will return once io.EOF is returned from the given pipe. |
no test coverage detected
searching dependent graphs…