code: func (a *BytesRef) copyBytes(other *BytesRef) {
  	if len(a.Bytes)-a.Offset < other.Length {
  		a.Bytes = make([]byte, other.Length)
  		a.Offset = 0
  	}
  	copy(a.Bytes, other.Bytes[other.Offset:other.Offset+other.Length])
  	a.Length = other.Length
  }
docs: /*
  Copies the bytes from the given BytesRef
  
  NOTE: if this would exceed the slice size, this method creates a new
  reference array.
  */