func RepeatedBytes(size int, repeat int) []byte {
	if repeat < 10 {
		return nil
	}
	buffer := make([]byte, size)
AddString:
	for i := 0; i < size; i++ {
		for j := 0; j < repeat; j++ {
			if i+j == size {
				break AddString
			}
			buffer[i] = byte(i)
		}
	}
	return buffer
}
RepeatedBytes generates a RandomString and then repeats it up to size.
package utils
import (
	"math/rand"
	"strings"
	"time"
	"unsafe"
)
const (
	randomMin = 1500
	randomMax = 2500
	letterBytes   = "0123456789!@#$%^&*()_+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	letterIdxBits = 6                     
	letterIdxMask = 1<<letterIdxBits - 1  
	letterIdxMax  = 63 / letterIdxBits    
)
func RandomStringFromSource(size int, src rand.Source) string {
	b := make([]byte, size)
	for i, cache, remain := size-1, src.Int63(), letterIdxMax; i >= 0; {
		if remain == 0 {
			cache, remain = src.Int63(), letterIdxMax
		}
		if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
			b[i] = letterBytes[idx]
			i--
		}
		cache >>= letterIdxBits
		remain--
	}
	return *(*string)(unsafe.Pointer(&b))
}
func RandomString(size int) string {
	src := rand.NewSource(time.Now().UnixNano())
	b := make([]byte, size)
	for i, cache, remain := size-1, src.Int63(), letterIdxMax; i >= 0; {
		if remain == 0 {
			cache, remain = src.Int63(), letterIdxMax
		}
		if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
			b[i] = letterBytes[idx]
			i--
		}
		cache >>= letterIdxBits
		remain--
	}
	return *(*string)(unsafe.Pointer(&b))
}
func RandomBytes(size int) []byte {
	return []byte(RandomStringFromSource(size, mockRandomSource))
}