File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ ok github.com/jedib0t/go-passwords/password 8.178s
28
28
29
29
### Random Passwords
30
30
``` golang
31
- generator , err := password.NewGenerator (password.AlphaNumeric , 8 )
31
+ generator , err := password.NewGenerator (
32
+ password.WithCharset (password.AlphaNumeric ),
33
+ password.WithLength (8 ),
34
+ )
32
35
if err != nil {
33
36
panic (err.Error ())
34
37
}
@@ -56,7 +59,10 @@ Password # 10: "kIbf3Wsm"
56
59
57
60
### In a Loop
58
61
``` golang
59
- sequencer , err := password.NewSequencer (password.AllChars .WithoutAmbiguity (), 8 )
62
+ sequencer , err := password.NewSequencer (
63
+ password.WithCharset (password.AllChars .WithoutAmbiguity ()),
64
+ password.WithLength (8 ),
65
+ )
60
66
if err != nil {
61
67
panic (err.Error ())
62
68
}
@@ -87,7 +93,10 @@ Password # 10: "AAAAAAAK"
87
93
88
94
### Streamed (for async processing)
89
95
``` golang
90
- sequencer , err := password.NewSequencer (password.Charset (" AB" ), 5 )
96
+ sequencer , err := password.NewSequencer (
97
+ password.WithCharset (password.Charset (" AB" )),
98
+ password.WithLength (5 ),
99
+ )
91
100
if err != nil {
92
101
panic (err.Error ())
93
102
}
You can’t perform that action at this time.
0 commit comments