• Robert Griesemer's avatar
    go/parser: simplify code to read from an io.Reader (cleanup) · 29461ccc
    Robert Griesemer authored
    ioutil.ReadAll didn't exist when we wrote that parser code
    originally (in 2009). Now it does, so use it. This may also
    make that code path slightly more efficient.
    
    Also, now that we are guaranteed to have a fast path for reading
    from an io.Reader (and thus an io.ReadCloser), simplify setup
    code for parser.ParseFile calls in srcimporter.Importer.ParseFiles.
    
    Remove the associated TODO since we cannot reproduce any significant
    performance differences when running go test -run ImportStdLib for
    the case where we used to read directly from a file (even before the
    change to the parser).
    
    Fixes #19281.
    
    Change-Id: I816459d092bb9e27fdc85089b8f21d57ec3fd79a
    Reviewed-on: https://go-review.googlesource.com/85395Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
    29461ccc
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...