diff options
author | Russ Cox <rsc@golang.org> | 2023-03-13 17:12:40 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-04-11 19:40:45 +0000 |
commit | 3974029671ead7fa0bf093e4372d354c7e620800 (patch) | |
tree | 1408f3731f9a0cb5ccb7d3fa31f84eb3fca04d2a /api | |
parent | 830f54b70ed2ce0c28c8db30876aba67beed7ee3 (diff) | |
download | go-git-3974029671ead7fa0bf093e4372d354c7e620800.tar.gz |
go/ast: add File.GoVersion
For #57001, compilers and others tools will need to understand that
a different Go version can be used in different files in a program,
according to the //go:build lines in those files.
This CL adds a GoVersion string field to ast.File, to allow exposing this
per-file Go version information.
For #59033.
Change-Id: I3931ea86c237983d152964f48dce498bcb1f06aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/476276
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/59033.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/api/next/59033.txt b/api/next/59033.txt index 4c37697462..d3b319c483 100644 --- a/api/next/59033.txt +++ b/api/next/59033.txt @@ -1,2 +1,3 @@ +pkg go/ast, type File struct, GoVersion string #59033 pkg go/build/constraint, func GoVersion(Expr) string #59033 |