MCPcopy Create free account
hub / github.com/alibaba/open-code-review / writeOutError

Function writeOutError

cmd/opencodereview/shared.go:585–590  ·  view source on GitHub ↗

writeOutError surfaces deferred write errors from writers that record them (lazyFileWriter); plain writers such as os.Stdout report nil.

(out io.Writer)

Source from the content-addressed store, hash-verified

583// writeOutError surfaces deferred write errors from writers that record them
584// (lazyFileWriter); plain writers such as os.Stdout report nil.
585func writeOutError(out io.Writer) error {
586 if r, ok := out.(interface{ Err() error }); ok {
587 return r.Err()
588 }
589 return nil
590}
591
592// Close closes the underlying file. It is a no-op when the file was never
593// created (no output produced), so failure paths cannot leave a fresh empty

Callers 4

outputPreviewFunction · 0.85
emitRunResultFunction · 0.85

Calls 1

ErrMethod · 0.80