Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrefixWriter ¶
type PrefixWriter struct {
// contains filtered or unexported fields
}
PrefixWriter is io.Writer interface implementation where the specified prefix will be added to the beginning of a new line.
func NewWriter ¶
func NewWriter(writer io.Writer, prefix string) *PrefixWriter
NewWriter wrappers passed io.Writer to PrefixWriter with passed prefix.
func (*PrefixWriter) Write ¶
func (writer *PrefixWriter) Write(payload []byte) (int, error)
Write is io.Writer interface implementation.
Write writes len(payload) bytes from payload to the underlying data stream. It returns the number of bytes written from payload (0 <= n <= len(payload)) and any error encountered that caused the write to stop early. Write returns a non-nil error if it returns n < len(payload). Write does not modify the slice data, even temporarily. Write does not retain payload.
Click to show internal directories.
Click to hide internal directories.