fix: lint - p.Start is deprecated
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Dawid Wysokiński 2022-12-11 18:58:31 +01:00
parent 762a5008a6
commit 8bf93e81fd
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
1 changed files with 3 additions and 3 deletions

View File

@ -34,11 +34,11 @@ func Encrypt(plaintext, password []byte) ([]byte, error) {
binary.BigEndian.PutUint32(iter, uint32(iterations))
if _, err := rand.Read(iv); err != nil {
if _, err = rand.Read(iv); err != nil {
return nil, fmt.Errorf("rand.Read(iv): %w", err)
}
if _, err := rand.Read(salt); err != nil {
if _, err = rand.Read(salt); err != nil {
return nil, fmt.Errorf("rand.Read(salt): %w", err)
}
@ -119,7 +119,7 @@ func DecryptAsEntries(text, password []byte) ([]Entry, error) {
}
var entries []Entry
if err := json.Unmarshal(result, &entries); err != nil {
if err = json.Unmarshal(result, &entries); err != nil {
return nil, fmt.Errorf("json.Unmarshal: %w", err)
}