MCPcopy Create free account
hub / github.com/docker/compose / Read

Method Read

pkg/utils/safebuffer.go:37–41  ·  view source on GitHub ↗

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

(p []byte)

Source from the content-addressed store, hash-verified

35
36// Read is a thread safe version of bytes.Buffer::Read
37func (b *SafeBuffer) Read(p []byte) (n int, err error) {
38 b.m.RLock()
39 defer b.m.RUnlock()
40 return b.b.Read(p)
41}
42
43// Write is a thread safe version of bytes.Buffer::Write
44func (b *SafeBuffer) Write(p []byte) (n int, err error) {

Callers 2

doTestFunction · 0.45
randomProjectNameFunction · 0.45

Calls

no outgoing calls

Tested by 2

doTestFunction · 0.36
randomProjectNameFunction · 0.36