MCPcopy
hub / github.com/bitfield/script / Error

Method Error

script.go:397–404  ·  view source on GitHub ↗

Error returns any error present on the pipe, or nil otherwise. Error is not a sink and does not wait until the pipe reaches completion. To wait for completion before returning the error, see [Pipe.Wait].

()

Source from the content-addressed store, hash-verified

395// completion. To wait for completion before returning the error,
396// see [Pipe.Wait].
397func (p *Pipe) Error() error {
398 if p.mu == nil { // uninitialised pipe
399 return nil
400 }
401 p.mu.Lock()
402 defer p.mu.Unlock()
403 return p.err
404}
405
406// Exec runs cmdLine as an external command, sending it the contents of the
407// pipe as input, and produces the command's standard output (see below for

Callers 15

BytesMethod · 0.95
CountLinesMethod · 0.95
EchoMethod · 0.95
ExitStatusMethod · 0.95
FilterMethod · 0.95
FirstMethod · 0.95
HashMethod · 0.95
LastMethod · 0.95
ReadMethod · 0.95
SliceMethod · 0.95
StdoutMethod · 0.95
StringMethod · 0.95

Calls

no outgoing calls