go.x2ox.com/sorbifolia/random@v0.0.0-20240520090142-6d8be5c4ed59/random.go (about) 1 package random 2 3 const ( 4 randBytes = "0123456789aAbBcCdDeEfFgGhHiUjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ" 5 randBytesLen = len(randBytes) 6 ) 7 8 type Random interface { 9 SetRandBytes(data []byte) Random 10 RandString(length int) string 11 12 Uint() uint 13 Uint64() uint64 14 Uint32() uint32 15 Uint16() uint16 16 Uint8() uint8 17 18 Int() int 19 Int64() int64 20 Int32() int32 21 Int16() int16 22 Int8() int8 23 24 Uintn(n uint) uint 25 Uint64n(n uint64) uint64 26 Uint32n(n uint32) uint32 27 Uint16n(n uint16) uint16 28 Uint8n(n uint8) uint8 29 30 Intn(n int) int 31 Int64n(n int64) int64 32 Int32n(n int32) int32 33 Int16n(n int16) int16 34 Int8n(n int8) int8 35 }