diff --git a/README.md b/README.md index 10d389cf..205b00fb 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@

Visit aah's official website https://aahframework.org to learn more

-

Build Status Code Coverage Go Report Card Release Version Godoc Twitter @aahframework

+

Build Status Code Coverage Go Report Card Release Version Godoc Twitter @aahframework

### News + * `v0.12.3` [released](https://docs.aahframework.org/release-notes.html) and tagged on Feb 06, 2019. * `v0.12.2` [released](https://docs.aahframework.org/release-notes.html) and tagged on Dec 13, 2018. * `v0.12.0` [released](https://docs.aahframework.org/release-notes.html) and tagged on Dec 02, 2018. * `v0.11.4` [released](https://docs.aahframework.org/v0.11/release-notes.html) and tagged on Aug 27, 2018. @@ -18,7 +19,7 @@ [![Stargazers over time](https://starcharts.herokuapp.com/go-aah/aah.svg)](https://starcharts.herokuapp.com/go-aah/aah) -### Why aah? +### Introduction aah aims to provide necessary components to build modern Web, API and WebSocket applications. aah framework is secure, rapid and extensible. It takes full care of infrastructure, boilerplate code, repetitive activities, reusable components, etc. diff --git a/ainsp/program.go b/ainsp/program.go index 8dce0c0b..a67266ca 100644 --- a/ainsp/program.go +++ b/ainsp/program.go @@ -85,20 +85,24 @@ func (prg *Program) CreateImportPaths(types []*typeInfo, importPaths map[string] func (prg *Program) process() { for _, pkgInfo := range prg.Packages { pkgInfo.Types = map[string]*typeInfo{} + fileImports := make(map[string]string) - // Each source file + // Processing package import path and type for name, file := range pkgInfo.Pkg.Files { pkgInfo.Files = append(pkgInfo.Files, filepath.Base(name)) - fileImports := make(map[string]string) - for _, decl := range file.Decls { // Processing imports pkgInfo.processImports(decl, fileImports) // Processing types pkgInfo.processTypes(decl, fileImports) + } + } - // Processing methods + // Process methods only after `Type` and `Import Path` are resolved. + // Refer to GitHub #248 for more info. + for _, file := range pkgInfo.Pkg.Files { + for _, decl := range file.Decls { processMethods(pkgInfo, prg.RegisteredActions, decl, fileImports) } } diff --git a/ainsp/util.go b/ainsp/util.go index 00867fef..0c96aeff 100644 --- a/ainsp/util.go +++ b/ainsp/util.go @@ -136,8 +136,7 @@ func processMethods(pkg *packageInfo, routeMethods map[string]map[string]uint8, if ty := pkg.Types[controllerName]; ty == nil { pos := pkg.Fset.Position(decl.Pos()) filename := stripGoPath(pos.Filename) - fmt.Println("filename", filename, "pos.Filename", pos.Filename) - log.Errorf("AST: Method '%s' has incorrect struct recevier '%s' on file [%s] at line #%d", + log.Errorf("AST: Method '%s' has incorrect struct receiver '%s' on file [%s] at line #%d", actionName, controllerName, filename, pos.Line) } else { ty.Methods = append(ty.Methods, method) diff --git a/version.go b/version.go index ead43bb9..d2f359e4 100644 --- a/version.go +++ b/version.go @@ -5,4 +5,4 @@ package aah // Version no. of aah framework -const Version = "0.12.2" +const Version = "0.12.3"