live video streaming server in golang
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
301 B

package utils
import (
"math/rand"
"strconv"
"strings"
"time"
)
func init() {
rand.Seed(time.Now().Unix())
}
func RandomNumberString(length int) string {
var result strings.Builder
for n := 0; n < length; n++ {
result.WriteString(strconv.Itoa(rand.Intn(9)))
}
return result.String()
}