websocketnhooyr.io/websocket/internal/test/xrand Index | Files

package xrand

import "nhooyr.io/websocket/internal/test/xrand"

Index

Functions

func Base64

func Base64(n int) string

Base64 returns a randomly generated base64 string of length n.

func Bool

func Bool() bool

Bool returns a randomly generated boolean.

func Bytes

func Bytes(n int) []byte

Bytes generates random bytes with length n.

func Int

func Int(max int) int

Int returns a randomly generated integer between [0, max).

func String

func String(n int) string

String generates a random string with length n.

Source Files

xrand.go

Version
v1.8.17 (latest)
Published
Aug 10, 2024
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.