func NewBuffer(writer io.Writer) io.Writer {
	return &Buffer{writer: writer}
}
NewBuffer is used to create a new buffer
package concurrent
import (
	"io"
	"sync"
)
type Buffer struct {
	writer io.Writer
	mutex  sync.Mutex
}
func (s *Buffer) Write(p []byte) (n int, err error) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	return s.writer.Write(p)
}