MCPcopy
hub / github.com/docker/compose / GetWriter

Function GetWriter

pkg/utils/writer.go:25–30  ·  pkg/utils/writer.go::GetWriter

GetWriter creates an io.Writer that will actually split by line and format by LogConsumer

(consumer func(string))

Source from the content-addressed store, hash-verified

23
24// GetWriter creates an io.Writer that will actually split by line and format by LogConsumer
25func GetWriter(consumer func(string)) io.WriteCloser {
26 return &splitWriter{
27 buffer: bytes.Buffer{},
28 consumer: consumer,
29 }
30}
31
32type splitWriter struct {
33 buffer bytes.Buffer

Callers 5

doLogContainerMethod · 0.92
doAttachContainerMethod · 0.92
streamPreStartLogsMethod · 0.92
runHookMethod · 0.92
TestSplitWriterFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSplitWriterFunction · 0.68