
This is needed for the type checker, otherwise it doesn't know which Go version it should use for type checking.
17 строки
222 Б
Go
17 строки
222 Б
Go
//go:build go1.22
|
|
|
|
package cgo
|
|
|
|
// Code specifically for Go 1.22.
|
|
|
|
import (
|
|
"go/ast"
|
|
"go/token"
|
|
)
|
|
|
|
func init() {
|
|
setASTFileFields = func(f *ast.File, start, end token.Pos) {
|
|
f.FileStart = start
|
|
f.FileEnd = end
|
|
}
|
|
}
|