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

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

Comments

Projects
None yet
2 participants

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 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 Apr 9, 2013

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