Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeadWriter ¶
HeadWriter keeps the first 'Limit' bytes in memory.
func (*HeadWriter) Bytes ¶
func (w *HeadWriter) Bytes() []byte
type OutputCapturer ¶
type OutputCapturer struct { HeadWriter TailWriter Limit int // contains filtered or unexported fields }
OutputCapturer keeps the first 'Limit' bytes and the last 'Limit' bytes in memory. If the total number of bytes written exceeds 'Limit', the middle is truncated. The writer is thread-safe.
func NewOutputCapturer ¶
func NewOutputCapturer(limit int) *OutputCapturer
func (*OutputCapturer) Bytes ¶
func (w *OutputCapturer) Bytes() []byte
func (*OutputCapturer) String ¶ added in v1.1.0
func (w *OutputCapturer) String() string
type SynchronizedWriter ¶ added in v1.0.0
type TailWriter ¶
tailWriter keeps the last 'Limit' bytes in memory.
func (*TailWriter) Bytes ¶
func (w *TailWriter) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.