github.com/bibaroc/wingman@v0.0.2-0.20200911182922-33c2085136b1/pkg/logger/buffer.go (about) 1 package logger 2 3 import ( 4 "io" 5 ) 6 7 var _ io.Writer = (*cbuff)(nil) 8 9 type cbuff []byte 10 11 func (c *cbuff) Write(bytes []byte) (int, error) { 12 *c = append(*c, bytes...) 13 return len(bytes), nil 14 }