Generate Password contain double quotes (") and backslash (\)
Kaustubh-pande opened this issue · comments
Kaustubh Pande commented
In most of the case password not accept double-quotes (") and backslash () but Generate password function generate these symbols.
Need to remove these from generate.go.
Seth Vargo commented
You can customize the list of letters, symbols, numbers, etc. Create a new generator object and alter the list of symbols to be a string of the allowed symbols (e.g. "!@#$%^&*()"
) and it will only generate from those symbols.
gen, err := password.NewGenerator(&password.NewGeneratorInput{
Symbols: "PUT YOUR LIST OF SYMBOLS HERE AS A SINGLE STRING",
})
if err != nil {
# ...
}
gen.Generate(...)
Kaustubh Pande commented
Sorry, my bad...
I used your example from README.
Just for a suggestion, you can add these in README it will be more helpful.
Seth Vargo commented
Hi @Kaustubh-pande it's in the godoc