-
Notifications
You must be signed in to change notification settings - Fork 38
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
HandleFuncs can now be Type Methods as well. #2
Conversation
`http.HandleFunc` documentation was not discovered because only first class functions were traversed when building apib documentation. Now both first class functions and type methods are traversed. For example: type WidgetController struct {} // GetTypeWidget retrieves a single Widget func (* WidgetController) GetWidget(w, r) { }
Hi! Thanks so much for the PR, I'm sorry I haven't had a chance to review your code yet, things have been busy with work and Women Who Go. I will try to review your code this weekend. Sarah |
Hi Sarah, funny when you said Women Who Go at first, I thought you meant the go board Cheers, Ivan Ivan On Wed, Jun 22, 2016 at 5:55 PM, Sarah Adams [email protected]
|
Yea, the tests were already broken. You can run the example pkg tests and check the output manually. You've rewritten all the imports to |
Yes, how would you do this if you were me? The PR contains 2 commits; the Ivan On Mon, Jul 18, 2016 at 9:57 AM, Sarah Adams [email protected]
|
Ah, so pull requests are based off branches. So you need to get rid of the second commit in this branch. What I would do is: $ cd $GOPATH/github.com/ivaningrooves/test2doc
$ git checkout master # you're probably already on the master branch
$ git checkout -b tmp # save the current state of your master branch on a new branch, `tmp`
$ git checkout master # checkout master branch again
$ git reset --hard HEAD^ # reset backwards 1 commit from HEAD
$ git push -f origin master # force-push the new state of your master branch Now if you ever want to look at the second commit again, it will be on the Hope that helps! |
Thank you! You should be able to build & run the PR now. Ivan On Mon, Jul 18, 2016 at 10:48 AM, Sarah Adams [email protected]
|
Hm, it looks like the imports are still pointing at your code and not mine. Did you follow the steps I outlined above? Or did you do something else |
./scripts/combine.sh | ||
``` | ||
|
||
final apib doc file is generated at `example/apidoc.apib` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why has this file been deleted?
It looks like you deleted my example pkg too :( |
Hi Sarah, I did remove the changes from the PR but I had to add them back to my fork Ivan On Mon, Jul 18, 2016 at 4:28 PM, Sarah Adams [email protected]
|
I created a new PR #3 |
See #3 |
http.HandleFunc
documentation was not discovered because onlyfirst class functions were traversed when building apib documentation.
Now both first class functions and type methods are traversed.
For example: