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

Function writeOutError

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

687// writeOutError surfaces deferred write errors from writers that record them
688// (lazyFileWriter); plain writers such as os.Stdout report nil.
689func writeOutError(out io.Writer) error {
690 if r, ok := out.(interface{ Err() error }); ok {
691 return r.Err()
692 }
693 return nil
694}
695
696// Close commits a complete output file atomically. It is a no-op when no Write
697// occurred, and it discards the temporary file when a Write already failed.

Callers 4

outputPreviewFunction · 0.85
emitRunResultFunction · 0.85

Calls 1

ErrMethod · 0.45