If a file's name, after stripping the extension and a possible _test suffix, matches any of the following patterns:
Wherever a file's "extension" is mentioned in the Go documentation, it means whatever comes after the final . in the file name. This is also what path.Ext documents and computes.
However, the os/arch-matching code takes the extension from the first instance of . rather than the last, as the documentation would lead me to expect.
This places requirements for using the os/arch constraints in file names that are not documented anywhere and are inconsistent with the way Go code and documentation usually deals with file extensions.
The text was updated successfully, but these errors were encountered:
Previously, goodOSArchFile trimmed the file name's extension from the first
instance of "." in the name. This resulted in strange behavior when
compiling files with dots in their names.
This change causes goodOSArchFile to trim the file name's extension from
the final instance of ".", as path.Ext suggests should happen.