There's no way at the moment to use Import or ImportDir to select all the files in package ignoring build constraints. There is the Package.IgnoredGoFiles field, but that does not extend to finding the dependencies of the ignored files, and so requires extra parsing steps.
One use case for this is in situations like App Engine: we want to select all the source files for an app, but not exclude source file that would be needed to compile a package in other/future versions of Go. So, we want to select files ignoring any go1.x tags.
/cc @dsymonds @adg
There's no way at the moment to use
ImportorImportDirto select all the files in package ignoring build constraints. There is thePackage.IgnoredGoFilesfield, but that does not extend to finding the dependencies of the ignored files, and so requires extra parsing steps.One use case for this is in situations like App Engine: we want to select all the source files for an app, but not exclude source file that would be needed to compile a package in other/future versions of Go. So, we want to select files ignoring any go1.x tags.
/cc @dsymonds @adg