# 'go list -mod=readonly -e should attribute errors
# to individual missing packages.
# Verifies golang.org/issue/34829.
go list -mod=readonly -e -deps -f '{{if .Error}}{{.ImportPath}}: {{.Error}}{{end}}' .
stdout 'example.com/missing: use.go:3:8: cannot find module providing package example.com/missing: import lookup disabled by -mod=readonly'

-- go.mod --
module example.com/m

go 1.14

-- use.go --
package use

import _ "example.com/missing"
