util – Random Generators & Helpers for Testing / SeedingThe util package provides helper functions for generating random data, useful for testing, data seeding, and bootstrapping mock environments. It includes utilities for random strings, emails, names, task metadata, and password hashing.
RandomIntfunc RandomInt(min, max int64) int64
Generates a random integer between min and max (inclusive).
✅ Automatically swaps values if min > max.
RandomStringfunc RandomString(n int) string
Generates a random lowercase string of length n, using only characters from the set abcdefghjklmnopqrstuvwxyz.
RandomNamefunc RandomName() string
Returns a random 6-character name. Primarily used for generating placeholder user names.
RandomEmailfunc RandomEmail() string