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

Rename Start to Init or add NewRouter() method #2

Closed
felixge opened this issue Apr 9, 2013 · 2 comments
Closed

Rename Start to Init or add NewRouter() method #2

felixge opened this issue Apr 9, 2013 · 2 comments

Comments

@felixge
Copy link

felixge commented Apr 9, 2013

Hi,

I just saw your post on HN, and found your project very interesting. When looking through the README I noticed that you have Start() method that initializes the data structure, which confused me right away. My reaction was: "Wait, is he starting a server from the router here?". Turns out you're not, and your lib is super sane. However, I'd think renaming this method to Init() or providing a NewRouter() function that returns an initialized data structure would be much more idiomatic here!

HTH,
Felix

@felixge
Copy link
Author

felixge commented Apr 9, 2013

I guess I submitted a duplicate of #1, so I'm closing this. Consider me a +1 on adding a constructor : )

@felixge felixge closed this as completed Apr 9, 2013
@ant0ine
Copy link
Owner

ant0ine commented Apr 9, 2013

Thanks for the comment! Yes, there is already a pull request open. The thing is that I may want to merge go-urlrouter into go-json-rest. In that case I probably won't need the constructor.

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