X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fcompile%2Finternal%2Ftypes2%2Fapi.go;h=675882c49f1b8d874e6355d8b9b6cd322e33be8c;hb=1fc45e9a2b7f457451106d5bf7a40d86257d639e;hp=d807096db599900300dd784714155ba04f38bae0;hpb=eda42f7c60adab26ed1a340414c726c4bf46b1f7;p=gostls13.git diff --git a/src/cmd/compile/internal/types2/api.go b/src/cmd/compile/internal/types2/api.go index d807096db5..675882c49f 100644 --- a/src/cmd/compile/internal/types2/api.go +++ b/src/cmd/compile/internal/types2/api.go @@ -294,10 +294,12 @@ type Info struct { // appear in this list. InitOrder []*Initializer - // FileVersions maps a file's position base to the file's Go version. - // If the file doesn't specify a version and Config.GoVersion is not - // given, the reported version is the zero version (Major, Minor = 0, 0). - FileVersions map[*syntax.PosBase]Version + // FileVersions maps a file to its Go version string. + // If the file doesn't specify a version, the reported + // string is Config.GoVersion. + // Version strings begin with “go”, like “go1.21”, and + // are suitable for use with the [go/version] package. + FileVersions map[*syntax.PosBase]string } func (info *Info) recordTypes() bool { @@ -431,12 +433,6 @@ func (init *Initializer) String() string { return buf.String() } -// A Version represents a released Go version. -type Version struct { - Major int - Minor int -} - // Check type-checks a package and returns the resulting package object and // the first error if any. Additionally, if info != nil, Check populates each // of the non-nil maps in the Info struct.