Closed
Description
Go 1.16 adds support for go:embed
patterns in source files (#41191), which are parsed and reported by the go/build
package in the {,Test
,XTest
}EmbedPatterns
fields of the build.Package
struct as of CL 243941.
Much like imports, embed patterns can introduce errors in the build due to missing inputs — in this case, missing embedded files. Those errors need to be attributed back to source file positions.
For imports, the build.Package
struct represents the file and line information as token.Position
values in the {,Test
,XTest
}ImportPos
fields. However, the corresponding information for embed patterns seems not to be present.
This came to my attention via CL 280452.