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

Function writeOutError

cmd/opencodereview/shared.go:548–553  ·  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

546// writeOutError surfaces deferred write errors from writers that record them
547// (lazyFileWriter); plain writers such as os.Stdout report nil.
548func writeOutError(out io.Writer) error {
549 if r, ok := out.(interface{ Err() error }); ok {
550 return r.Err()
551 }
552 return nil
553}
554
555// Close closes the underlying file. It is a no-op when the file was never
556// 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