func (s *SafeByteBuffer) Write(p []byte) (n int, err error) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	return s.buffer.Write(p)
}
Write appends the contents of p to the buffer, growing the buffer as needed. It returns
the number of bytes written.
package utils
import (
	"bytes"
	"sync"
)
type SafeByteBuffer struct {
	buffer bytes.Buffer
	mutex  sync.Mutex
}