<p>I've decided to release my Verified.ninja project (Photo Verification for Online Dating) to the public. I'll no longer be working on the project, but I figured I'd share with you guys and hopefully it will help someone!</p>
<p><a href="https://github.com/verifiedninja/webapp">https://github.com/verifiedninja/webapp</a></p>
<hr/>**评论:**<br/><br/>oefig: <pre><p>Thank you! This is a fantastic example of simple MVC in Go using mostly the base libraries.</p></pre>motojo: <pre><p>My pleasure! Thanks for checking it out.</p></pre>no1youknowz: <pre><p>Wow, this looks like the best MVC I have seen so far!</p>
<p>Thank you for releasing it!</p></pre>motojo: <pre><p>Glad you like it!</p></pre>offensivetoothepaste: <pre><p>I think this might be a mistake? <a href="https://github.com/verifiedninja/webapp/blob/master/route/middleware/logrequest/logrequest.go#L17" rel="nofollow">https://github.com/verifiedninja/webapp/blob/master/route/middleware/logrequest/logrequest.go#L17</a></p></pre>cathalgarvey: <pre><p>If you mean the hardcoded date, that's how Go's date formatting works: you offer the preferred format using that exact date/time as your formatting example.</p></pre>Azzk1kr: <pre><p>That confused me a bit the first time I needed to do time formatting. Do you perhaps know why they didn't choose to use things like <code>%Y</code>, <code>%d</code> or whatever?</p></pre>AirborneArie: <pre><p>I see where you're coming from, but really "2006-01-02 03:04:05 PM" is so much more descriptive than using those formatting tags. </p>
<p>IMHO the code now reveals much clearer what dates are going to look like. It's also easy to change later (without having to look up those formatting tags).</p>
<p>Edit: the reason we <em>can</em> do this now is that computers are sufficiently fast to do this. I'm not sure if this is a runtime or compile-time thing, though. </p></pre>offensivetoothepaste: <pre><p>Oh that's interesting. Seems rather counterintuitive given how string formatting functions work in Go, and also how date formatting works in other languages.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传