Comments (3)
@adrianlop Found the root issue why it was unable discover the method from controller struct.
I have reviewed you code and also aah AST flow. When Package files gets processed by aah AST code. There are no guaranteed order in the file processing for type & method
since its type map[string]*File
.
Lines 90 to 104 in 8c41d00
So as per your code, controller defined oncaller.go
and action methods are defined all three files. Following log lines from random execution on my machine would convey what I mean.
2019-02-06 22:08:01.329 ERROR AST: Method 'TriggerGrafanaCall' has incorrect struct recevier 'Controller' on file [/xxx/ops-api/app/controllers/oncaller/grafana_webhook.go] at line #12
2019-02-06 22:08:01.329 ERROR AST: Method 'TriggerPrometheusCall' has incorrect struct recevier 'Controller' on file [/xxx/ops-api/app/controllers/oncaller/prometheus_webhook.go] at line #15
2019-02-06 22:08:11.154 ERROR AST: Method 'TriggerPrometheusCall' has incorrect struct recevier 'Controller' on file [/xxx/ops-api/app/controllers/oncaller/prometheus_webhook.go] at line #15
So solution to address this issue is to process all types for the package first and then go for processing methods.
from aah.
I have made a release of aah v0.12.3
&& cli v0.13.4
.
from aah.
just updated the framework and the cli. it's working :)
great stuff @jeevatkm, thank you very much for fixing this!
from aah.
Related Issues (20)
- Add precedence to de-facto headers X-Forwarded-Host, X-Forwarded-Port HOT 1
- Audit wiki Permissions HOT 2
- Override config not working for a single aah binary HOT 1
- Docs issue in "Getting started". HOT 4
- Error running aah cli 'build' on certain projects after upgrading go1.11 to 1.12 HOT 3
- Add pluggable component for health check feature HOT 3
- Expose an aah TestServer for aah users to thoroughly test aah applications
- Routes behavior with&without a root (/) route is inconsistent HOT 2
- Route param 'redirect_trailing_slash' can create redirect loop HOT 2
- Possibility to return a 5XX response code from the authc&authz phases. HOT 2
- invalid memory address or nil pointer dereference when registering centralized error handler HOT 2
- Notification to aah users :) HOT 2
- Flash messages are not deleted after read HOT 5
- Vulnerability HOT 4
- Regarding DDoS code section
- Support Go Mod HOT 1
- FATAL: go build: -i flag is deprecated / undefined: models HOT 2
- Address compile issue and make it work :) HOT 1
- Inactive? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aah.