cuelang.org/go@v0.10.1/internal/mod/modimports/testdata/nopackage.txtar (about) 1 -- want -- 2 imports_no_package.cue "dep1" 3 no_package.cue 4 -- want-imports -- 5 dep1 6 -- no_package.cue -- 7 // Valid syntax without a package clause. 8 9 foo: "bar" 10 -- imports_no_package.cue -- 11 // Valid syntax with an import but without a package clause. 12 // 13 // TODO(mvdan): should we collect imports from files without a package clause? 14 // On one hand cue/load with Config.Package "*" loads files without package as the package "_", 15 // but on the other, Go skips over `//go:build ignore` files in e.g. `go mod tidy`, 16 // and perhaps we consider no-package files to be a de facto "ignored from any package". 17 18 import "dep1" 19 20 foo: "bar"