mirror of
https://github.com/golang/go
synced 2024-11-18 13:24:39 -07:00
go/vcs: workaround EOF bug in token-based XML decoder
...using same logic as in $GOROOT/go/src/cmd/go/discovery.go See issue #13757 Change-Id: I2ace0abed0743f4a8675fa8780e190d640b57e6c Reviewed-on: https://go-review.googlesource.com/18196 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
157f8abbbd
commit
a09dffbb6c
@ -36,7 +36,7 @@ func parseMetaGoImports(r io.Reader) (imports []metaImport, err error) {
|
|||||||
for {
|
for {
|
||||||
t, err = d.Token()
|
t, err = d.Token()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == io.EOF {
|
if err == io.EOF || len(imports) > 0 {
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user