Improve warning message when unable to generate route for action.

This commit is contained in:
Robert Lillack
2015-03-04 22:09:53 +01:00
parent ccff6efb44
commit 95d62c1bbd

View File

@@ -433,7 +433,8 @@ func appendAction(fset *token.FileSet, mm methodMap, decl ast.Decl, pkgImportPat
var importPath string
typeExpr := NewTypeExpr(pkgName, field.Type)
if !typeExpr.Valid {
return // We didn't understand one of the args. Ignore this action. (Already logged)
log.Printf("Didn't understand argument '%s' of action %s. Ignoring.\n", name, getFuncName(funcDecl))
return // We didn't understand one of the args. Ignore this action.
}
if typeExpr.PkgName != "" {
var ok bool