Removed the cloning of the final data in the attachment processor (#114)
* removed the cloning of the final data in the attachment processor * fix linter
This commit is contained in:
parent
681ceb0546
commit
cea3d0da4d
4 changed files with 15 additions and 3 deletions
|
|
@ -90,7 +90,9 @@ func (keyRing *KeyRing) newAttachmentProcessor(
|
|||
go func() {
|
||||
defer attachmentProc.done.Done()
|
||||
ciphertext, _ := ioutil.ReadAll(reader)
|
||||
message := NewPGPMessage(ciphertext)
|
||||
message := &PGPMessage{
|
||||
Data: ciphertext,
|
||||
}
|
||||
split, splitError := message.SeparateKeyAndData(estimatedSize, garbageCollector)
|
||||
if attachmentProc.err != nil {
|
||||
attachmentProc.err = splitError
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ func (keyRing *KeyRing) GetKeyIDs() []uint64 {
|
|||
// parts of these KeyRings.
|
||||
func FilterExpiredKeys(contactKeys []*KeyRing) (filteredKeys []*KeyRing, err error) {
|
||||
now := time.Now()
|
||||
hasExpiredEntity := false
|
||||
hasExpiredEntity := false //nolint:ifshort
|
||||
filteredKeys = make([]*KeyRing, 0)
|
||||
|
||||
for _, contactKeyRing := range contactKeys {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue