MCPcopy Index your code
hub / github.com/cloudfoundry/cli / copyAndClose

Function copyAndClose

util/clissh/ssh.go:344–353  ·  view source on GitHub ↗
(wg *sync.WaitGroup, dest io.WriteCloser, src io.Reader)

Source from the content-addressed store, hash-verified

342}
343
344func copyAndClose(wg *sync.WaitGroup, dest io.WriteCloser, src io.Reader) {
345 _, err := io.Copy(dest, src)
346 if err != nil {
347 log.Errorln("copy and close:", err)
348 }
349 _ = dest.Close()
350 if wg != nil {
351 wg.Done()
352 }
353}
354
355func copyAndDone(wg *sync.WaitGroup, dest io.Writer, src io.Reader) {
356 _, err := io.Copy(dest, src)

Callers 2

InteractiveSessionMethod · 0.70

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected