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

Function writeOutError

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

682// writeOutError surfaces deferred write errors from writers that record them
683// (lazyFileWriter); plain writers such as os.Stdout report nil.
684func writeOutError(out io.Writer) error {
685 if r, ok := out.(interface{ Err() error }); ok {
686 return r.Err()
687 }
688 return nil
689}
690
691// Close commits a complete output file atomically. It is a no-op when no Write
692// 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