Commit Graph

2 Commits

Author SHA1 Message Date
Nic Cope 0c7b1eb549 Bump golangci-lint, copy config from c/c
This copies the latest config from c/c and addresses all the linter
errors that config produces.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2024-02-20 03:45:27 -08:00
Nic Cope 8df758d202 Move password generation into its own package
https://github.com/sethvargo/go-password

I considered using the above library, but its API is a little overkill for our
needs. I chose not to keep the previous GeneratePassword implementation because
I felt the length argument was a unintuitive. The argument specified the length
of the randomly generated bytes, which were then base64 encoded resulting in a
~33% overhead. So for example GeneratePassword(20) generated a 27 character
password.

Signed-off-by: Nic Cope <negz@rk0n.org>
2020-01-31 16:41:25 -08:00