MCPcopy
hub / github.com/uber-go/zap / WriteString

Method WriteString

buffer/buffer.go:127–130  ·  view source on GitHub ↗

WriteString writes a string to the Buffer. Error returned is always nil, function signature is compatible with bytes.Buffer and bufio.Writer

(s string)

Source from the content-addressed store, hash-verified

125// Error returned is always nil, function signature is compatible
126// with bytes.Buffer and bufio.Writer
127func (b *Buffer) WriteString(s string) (int, error) {
128 b.AppendString(s)
129 return len(s), nil
130}
131
132// TrimNewline trims any final "\n" byte from the end of the buffer.
133func (b *Buffer) TrimNewline() {

Callers 9

BenchmarkBuffersFunction · 0.95
TestBufferFunction · 0.95
ExampleWriterFunction · 0.80
TestWriterFunction · 0.80
TestWrite_SyncFunction · 0.80
FormatMethod · 0.80
FormatMethod · 0.80
TestBufferWritesFunction · 0.80
TestTestingWriterFunction · 0.80

Calls 1

AppendStringMethod · 0.95

Tested by 9

BenchmarkBuffersFunction · 0.76
TestBufferFunction · 0.76
ExampleWriterFunction · 0.64
TestWriterFunction · 0.64
TestWrite_SyncFunction · 0.64
FormatMethod · 0.64
FormatMethod · 0.64
TestBufferWritesFunction · 0.64
TestTestingWriterFunction · 0.64