diff --git a/go/vcs/discovery.go b/go/vcs/discovery.go index c4b0e3d142..f431dc1c5b 100644 --- a/go/vcs/discovery.go +++ b/go/vcs/discovery.go @@ -36,7 +36,7 @@ func parseMetaGoImports(r io.Reader) (imports []metaImport, err error) { for { t, err = d.Token() if err != nil { - if err == io.EOF { + if err == io.EOF || len(imports) > 0 { err = nil } return