Remove newInfo
because it is dead code
#20
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
startGetObjectRequest
will only callnewInfo
iff.info == nil
.startGetObjectRequest
is only called byhandleRead
.handleRead
is only called to handle areadRequest
.readRequest
is only issued in(*s3Reader).Read
.*s3Reader
is by(*s3File).Reader
. It only does this iff.mode == readonly
.readonly
*s3File
is by(*s3Impl).Open
.(*s3Impl).Open
will only return successfully if thehandleStat
sends a non-errorresponse
, viarunRequest
andstatRequest
.handleStat
only sends a non-error response after populatingf.info
with the result ofstat
, whenstat
returns anil
error.stat
only returns anil
error when the*s3Info
it returns is non-nil.f.info != nil
instartGetObjectRequest
, and it will not callnewInfo
.I think the
f.info == nil
case became obsolete in 3cf2bd3, which introduced thestatRequest
on(*s3Impl).Open
.This was raised and originally reasoned about in #16: #16 (comment).