MCPcopy
hub / github.com/docker/compose / Write

Method Write

pkg/utils/safebuffer.go:44–48  ·  view source on GitHub ↗

Write is a thread safe version of bytes.Buffer::Write

(p []byte)

Source from the content-addressed store, hash-verified

42
43// Write is a thread safe version of bytes.Buffer::Write
44func (b *SafeBuffer) Write(p []byte) (n int, err error) {
45 b.m.Lock()
46 defer b.m.Unlock()
47 return b.b.Write(p)
48}
49
50// String is a thread safe version of bytes.Buffer::String
51func (b *SafeBuffer) String() string {

Callers

nothing calls this directly

Calls 1

LockMethod · 0.45

Tested by

no test coverage detected