Skip to content

Commit

Permalink
add a couple of reminder TODOs for go/... packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdan authored and pagran committed Nov 12, 2023
1 parent 126618a commit 08b3d9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ type errJustExit int
func (e errJustExit) Error() string { return fmt.Sprintf("exit: %d", e) }

func goVersionOK() bool {
// TODO(mvdan): use go/version once we can require Go 1.22 or later: https://go.dev/issue/62039
const (
minGoVersionSemver = "v1.21.0"
suggestedGoVersion = "1.21"
Expand Down Expand Up @@ -1663,6 +1664,7 @@ func typecheck(pkgPath string, files []*ast.File, origImporter importerWithMap)
Selections: make(map[*ast.SelectorExpr]*types.Selection),
Instances: make(map[*ast.Ident]types.Instance),
}
// TODO(mvdan): we should probably set types.Config.GoVersion from go.mod
origTypesConfig := types.Config{Importer: origImporter}
pkg, err := origTypesConfig.Check(pkgPath, fset, files, info)
if err != nil {
Expand Down

0 comments on commit 08b3d9d

Please sign in to comment.