@@ -44,8 +44,8 @@ func RandomYearOrInt() string {
44
44
// initialize global pseudo random generator
45
45
r := rand .New (rand .NewSource (time .Now ().UnixNano ()))
46
46
47
- // Randomly decide between year, int, current year, or double digit
48
- yearOrInt := r .Intn (4 )
47
+ // Randomly decide between year, int, current year, or double- digit
48
+ yearOrInt := r .Intn (5 )
49
49
50
50
minYear := 1900
51
51
maxYear := time .Now ().Year ()
@@ -60,13 +60,14 @@ func RandomYearOrInt() string {
60
60
randomYear := r0 .Intn (maxYear - minYear + 1 ) + minYear
61
61
return strconv .Itoa (randomYear )
62
62
63
- } else if yearOrInt == 1 {
63
+ // 40% of the time it will return a single digit
64
+ } else if yearOrInt == 1 || yearOrInt == 4 {
64
65
65
66
// initialize global pseudo random generator
66
67
r1 := rand .New (rand .NewSource (time .Now ().UnixNano ()))
67
68
68
- // generates a random number between 0 and 99
69
- randomInt := r1 .Intn (100 )
69
+ // generates a random number between 0 and 9
70
+ randomInt := r1 .Intn (10 )
70
71
71
72
return fmt .Sprintf ("%d" , randomInt )
72
73
@@ -157,7 +158,7 @@ func createMemorable3Password() string {
157
158
158
159
} else if lexicalChoice == 3 {
159
160
160
- // TODO: createPronounVerbPassword()
161
+ // TODO: Some other grammatical variation
161
162
162
163
} else if lexicalChoice == 4 {
163
164
0 commit comments