Make linter happy and move to os from io/ioutil for reading/writing.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-08-14 15:49:05 +05:00
parent df5671586e
commit 2ec0e28243
28 changed files with 99 additions and 99 deletions

View File

@@ -76,7 +76,7 @@ type Paste struct {
func (p *Paste) CreatePassword(password string) error {
// Create salt - random string.
// Yes, it is insecure. Should be refactored!
// nolint:gosec
//nolint:gosec
seededRand := rand.New(rand.NewSource(time.Now().UnixNano()))
saltBytes := make([]byte, 64)
@@ -90,7 +90,7 @@ func (p *Paste) CreatePassword(password string) error {
// Create crypted password and hash it.
passwordCrypted, err := scrypt.Key([]byte(password), []byte(p.PasswordSalt), 131072, 8, 1, 64)
if err != nil {
// nolint:wrapcheck
//nolint:wrapcheck
return err
}