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

Method Lines

internal/ztest/writer.go:87–90  ·  view source on GitHub ↗

Lines returns the current buffer contents, split on newlines.

()

Source from the content-addressed store, hash-verified

85
86// Lines returns the current buffer contents, split on newlines.
87func (b *Buffer) Lines() []string {
88 output := strings.Split(b.String(), "\n")
89 return output[:len(output)-1]
90}
91
92// Stripped returns the current buffer contents with the last trailing newline
93// stripped.

Callers 3

TestSugarWithCapturesFunction · 0.95
TestLoggerWithCapturesFunction · 0.95
TestBufferFunction · 0.95

Calls 1

StringMethod · 0.95

Tested by 3

TestSugarWithCapturesFunction · 0.76
TestLoggerWithCapturesFunction · 0.76
TestBufferFunction · 0.76