func (l *Logger) Write(data []byte) (n int, err error) {
	ln := len(data)
	if l.enable {
		startPos := 0
		for i := 0; i < ln; i++ {
			if data[i] == '\n' {
				l.write(data[startPos : i+1])
				startPos = i + 1
			}
		}
		l.write(append(data[startPos:ln], byte('\n')))
	}
	return ln, nil
}
Improved io.writer for golet
package golet
import (
	"fmt"
	"io"
	"time"
)
type Logger struct {
	enable      bool
	enableColor bool
	out         io.Writer
	sid         string
	clr         color
}