github.com/OrigamiWang/msd/micro@v0.0.0-20240229032328-b62246268db9/util/rand/rand_test.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "testing" 6 ) 7 8 func TestGenerateRandomString(t *testing.T) { 9 type args struct { 10 length int 11 } 12 tests := []struct { 13 name string 14 args args 15 want string 16 }{ 17 // TODO: Add test cases. 18 { 19 args: args{ 20 length: 32, 21 }, 22 }, 23 } 24 for _, tt := range tests { 25 t.Run(tt.name, func(t *testing.T) { 26 got := GenerateRandomString(tt.args.length) 27 fmt.Println(got) 28 }) 29 } 30 }