MCPcopy
hub / github.com/cloudfoundry/cli / copyAndClose

Function copyAndClose

cf/ssh/ssh.go:199–205  ·  view source on GitHub ↗
(wg *sync.WaitGroup, dest io.WriteCloser, src io.Reader)

Source from the content-addressed store, hash-verified

197}
198
199func copyAndClose(wg *sync.WaitGroup, dest io.WriteCloser, src io.Reader) {
200 _, _ = io.Copy(dest, src)
201 _ = dest.Close()
202 if wg != nil {
203 wg.Done()
204 }
205}
206
207func copyAndDone(wg *sync.WaitGroup, dest io.Writer, src io.Reader) {
208 _, _ = io.Copy(dest, src)

Callers 2

InteractiveSessionMethod · 0.70

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected