Bytes is a thread safe version of bytes.Buffer::Bytes
()
| 56 | |
| 57 | // Bytes is a thread safe version of bytes.Buffer::Bytes |
| 58 | func (b *SafeBuffer) Bytes() []byte { |
| 59 | b.m.RLock() |
| 60 | defer b.m.RUnlock() |
| 61 | return b.b.Bytes() |
| 62 | } |
| 63 | |
| 64 | // RequireEventuallyContains is a thread safe eventual checker for the buffer content |
| 65 | func (b *SafeBuffer) RequireEventuallyContains(t testing.TB, v string) { |
no outgoing calls