Пример #1
0
func processPackage(fset *token.FileSet, files map[string]*ast.File) {
	// make a package (resolve all identifiers)
	pkg, err := ast.NewPackage(fset, files, types.GcImporter, types.Universe)
	if err != nil {
		report(err)
		return
	}
	_, err = types.Check(fset, pkg)
	if err != nil {
		report(err)
	}
}
Пример #2
0
func processPackage(fset *token.FileSet, files []*ast.File) {
	_, err := types.Check(fset, files)
	if err != nil {
		report(err)
	}
}