]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/types/api.go
[dev.typeparams] merge master (2f0da6d) into dev.typeparams
[gostls13.git] / src / go / types / api.go
index ec12fcf3804c3e898223635030d30551d16e3c58..09ac65b81f1117a00946dbb92713989e5ef26964 100644 (file)
@@ -101,6 +101,13 @@ type ImporterFrom interface {
 // A Config specifies the configuration for type checking.
 // The zero value for Config is a ready-to-use default configuration.
 type Config struct {
+       // GoVersion describes the accepted Go language version. The string
+       // must follow the format "go%d.%d" (e.g. "go1.12") or it must be
+       // empty; an empty string indicates the latest language version.
+       // If the format is invalid, invoking the type checker will cause a
+       // panic.
+       GoVersion string
+
        // If IgnoreFuncBodies is set, function bodies are not
        // type-checked.
        IgnoreFuncBodies bool