Skip to content

Commit

Permalink
Close revisit record before merge
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Dec 1, 2022
1 parent b48b83b commit b58a4ba
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,17 @@ func (l *Loader) LoadByStorageRef(ctx context.Context, storageRef string) (gowar
if err != nil {
return nil, err
}
defer revisitOf.Close()

rtrRecord, err = record.Merge(revisitOf)
if err != nil {
return nil, err
}
return rtrRecord, nil
case gowarc.Continuation:
log.Warn().Msg("Not implemented: storage ref resolved to a continuation record")
// TODO continuation not implemented
fallthrough
// TODO implement continuation record
return nil, fmt.Errorf("%s resolves to a continuation record (not implemented)", storageRef)
default:
rtrRecord = record
return record, nil
}

return rtrRecord, nil
}

0 comments on commit b58a4ba

Please sign in to comment.