MCPcopy Create free account
hub / github.com/chain/txvm / Writer

Struct Writer

errors/writer.go:20–24  ·  view source on GitHub ↗

Writer is in an implementation of the "sticky error writer" pattern as described in https://blog.golang.org/errors-are-values. A Writer makes one call on the underlying writer for each call to Write, until an error is returned. From that point on, it makes no calls on the underlying writer, and ret

Source from the content-addressed store, hash-verified

18// it makes no calls on the underlying writer,
19// and returns the same error value every time.
20type Writer struct {
21 w io.Writer
22 n int64
23 err error
24}
25
26// Write makes one call on the underlying writer
27// if no error has previously occurred.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected