func (s *MutexBuffer) Read(p []byte) (n int, err error) {
	s.mutex.RLock()
	defer s.mutex.RUnlock()
	return s.buffer.Read(p)
}
Write returns the current buffer
package util
import (
	"bytes"
	"sync"
)
type MutexBuffer struct {
	buffer bytes.Buffer
	mutex  sync.RWMutex
}
func (s *MutexBuffer) Write(p []byte) (n int, err error) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	return s.buffer.Write(p)
}