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

Method SetError

script.go:863–870  ·  view source on GitHub ↗

SetError sets the error err on the pipe.

(err error)

Source from the content-addressed store, hash-verified

861
862// SetError sets the error err on the pipe.
863func (p *Pipe) SetError(err error) {
864 if p.mu == nil { // uninitialised pipe
865 return
866 }
867 p.mu.Lock()
868 defer p.mu.Unlock()
869 p.err = err
870}
871
872// SHA256Sum returns the hex-encoded SHA-256 hash of the entire contents of the
873// pipe, or an error.

Callers 11

BytesMethod · 0.95
FilterMethod · 0.95
HashMethod · 0.95
StringMethod · 0.95
WaitMethod · 0.95
WithErrorMethod · 0.95
writeOrAppendFileMethod · 0.95

Calls

no outgoing calls