Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make me confusing code #59

Closed
huangxiaoye opened this issue Dec 21, 2012 · 1 comment
Closed

make me confusing code #59

huangxiaoye opened this issue Dec 21, 2012 · 1 comment

Comments

@huangxiaoye
Copy link

controller.go line 168
if renderArgNames, ok := methodType.RenderArgNames[line]; ok { why get renderArgNames from methodType.RenderArgNames through index line???? the line was assigned the value through this code "pc, _, line, ok := runtime.Caller(1)"

@robfig
Copy link
Contributor

robfig commented Jan 8, 2013

That code gets the line of the calling function and looks to see what RenderArgs were passed to it (those variable names are stored in RenderArgNames)

@robfig robfig closed this as completed Jan 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants