-- want --
valid:
$work/go.mod
$work/valid.go
$work/vendor/modules.txt

omitted:
$work/.hg_archival.txt: file is inserted by 'hg archive' and is always omitted
$work/.git: directory is a version control repository
$work/pkg/vendor/vendor.go: file is in vendor directory
$work/sub: directory is in another module
$work/vendor/x/y: file is in vendor directory

invalid:
$work/invalid.go': malformed file path "invalid.go'": invalid char '\''
-- valid.go --
-- go.mod --
go 1.23
-- invalid.go' --
-- vendor/modules.txt --
-- vendor/x/y --
-- sub/go.mod --
-- .hg_archival.txt --
-- .git/x --
-- pkg/vendor/vendor.go --
