Last active
August 29, 2015 14:19
-
-
Save karlseguin/c264863573a6bfbf7605 to your computer and use it in GitHub Desktop.
Find article for http://openmymind.net/Golangs-Error-Handling-Good-And-Bad/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadArticle (res, req) -> | |
article = yield findArticlebyId(...) | |
return res.notFound() unless artilce? | |
res.ok(article) | |
findArticleById (id) -> | |
conn = yield conn.Open(). | |
row = yield conn.QueryAsync("....", id) | |
new Article(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment