MCPcopy
hub / github.com/cilium/cilium / String

Method String

test/helpers/buffer.go:33–38  ·  view source on GitHub ↗

String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns " ". To build strings more efficiently, see the strings.Builder type.

()

Source from the content-addressed store, hash-verified

31//
32// To build strings more efficiently, see the strings.Builder type.
33func (buf *Buffer) String() string {
34 buf.mutex.Lock()
35 r := buf.buffer.String()
36 buf.mutex.Unlock()
37 return r
38}
39
40// Reset resets the buffer to be empty,
41// but it retains the underlying storage for use by future writes.

Callers 15

Test_genRSTTableFunction · 0.95
joinFunction · 0.95
TestTestHubbleObserveFunction · 0.95
TestNodeOutputsFunction · 0.95
TestNamespaceOutputsFunction · 0.95
Test_processResponseFunction · 0.95
StringMethod · 0.95

Calls 3

LockMethod · 0.65
StringMethod · 0.65
UnlockMethod · 0.65

Tested by 15

Test_genRSTTableFunction · 0.76
TestTestHubbleObserveFunction · 0.76
TestNodeOutputsFunction · 0.76
TestNamespaceOutputsFunction · 0.76
Test_processResponseFunction · 0.76
TestFormStatusResponseFunction · 0.76
TestNewMonitorFilterFunction · 0.76