<p>I was looking into beego for writing a RESTful API for one of my projects. I set up the quickstarter beego project and also the autogenerated API project. I see Namespaces and Annotation routers, I would like to know the advantages on using these(NS etc) instead of the normal routers that I get during quickstart. </p>
<p>Quickly pointout the advantages of Namespaces, NSInclude etc.</p>
<p>EDIT: I got it, I understaood Namespaces, NSInclude. But I am more curious on the annotation routers,(@router , @params etc). Can someone elaborate it. For instance for /user, inside the UserCOntroller, top of Get(), we ll use </p>
<p>'@router /:uid [PUT]'</p>
<p>beego decides on this comment? Thats so screwy, specifying the secondary routes on comments. </p>
<hr/>**评论:**<br/><br/>grimborg: <pre><p>I'm not familiar with beego, but you may be better off skipping it and just using the standard library.</p>
<p>Check out <a href="http://thenewstack.io/make-a-restful-json-api-go/" rel="nofollow">http://thenewstack.io/make-a-restful-json-api-go/</a> for example.</p>
<p>Check out also the <a href="http://www.gorillatoolkit.org/" rel="nofollow">gorilla toolkit</a>. mux and schema may be particularly useful in your case.</p></pre>Bromlife: <pre><p>That's the thing I don't understand, these frameworks really don't provide a lot of functionality that can't easily be replicated by the standard library. If you're just starting out with Go, you should definitely learn the standard library before you start bringing in monolithic frameworks. Then, once you've learnt the basics of the standard library you are in the position to decide whether this library is actually worth your time or not.</p>
<p>Which of course, it isn't.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传