return ""
}
var p parseError
- if e, ok := err.(scanner.ErrorList); ok {
- p.ErrorList = &e
+ if errlist, ok := err.(scanner.ErrorList); ok {
+ p.ErrorList = &errlist
} else {
- p.ErrorString = e.Error()
+ p.ErrorString = err.Error()
}
s, err := json.Marshal(p)
if err != nil {
! go list all
! stderr 'panic'
-[!GOOS:windows] [!GOOS:solaris] [!GOOS:freebsd] [!GOOS:openbsd] [!GOOS:netbsd] stderr 'invalid import path'
-# #73976: Allow 'no errors' on Windows, Solaris, and BSD until issue
-# is resolved to prevent flakes. 'no errors' is printed by
-# empty scanner.ErrorList errors so that's probably where the
-# message is coming from, though we don't know how.
-[GOOS:windows] stderr 'invalid import path|no errors'
-[GOOS:solaris] stderr 'invalid import path|no errors'
-[GOOS:freebsd] stderr 'invalid import path|no errors'
-[GOOS:openbsd] stderr 'invalid import path|no errors'
-[GOOS:netbsd] stderr 'invalid import path|no errors'
+stderr 'invalid import path'
# go list produces a package for 'p' but not for ''
go list -e all