16 comments

[ 3.1 ms ] story [ 44.3 ms ] thread
My first dabble in to the world of Go. By no means perfect so I'd love to get some feedback/revisions from more experienced Gophers :)
(comment deleted)
I get the feeling there are bots/zealots upvoting anything with the word go in the title... and I say this as a fan of the language.
Quite possibly, I guess it makes a change from {INSERT ANYTHING}.js
Probably just zealots.

It was the exact same thing on HN when Node.js was just starting to spike in popularity. Same with frontend JS frameworks.

Possibly. Like I said, I like Go. And I don't like to insult anyone's work. But this doesn't seem front page worthy. It's incomplete, short, and not idiomatic. Then I remember seeing posts about Go the game too, which made me suspect bots. I don't care quite enough to test, but I hate to think this quality source of news is being manipulated. Ah well.
Okay, cool, but... MySQL?!
What about MySQL?
Damn, you spotted my glaring omission! I guess my thinking is that with Gorp the database choice is up to you ..maybe go-martini-facebook-gorp then ;)
Oh, I was just asking what pshc's comment was about. I'm still unsure what: "Okay, cool, but... MySQL?!" is supposed to mean.
Ah, in that case I'm not sure, perhaps an aversion to MySQL? Either way Gorp gives some level of choice.
Oracle killed it. Why not MariaDB or PostgreSQL?
Why the code is so full of undocumented TODOs? Is this a finished product or work in progress? If the former then you need good documentation. Badly. If the latter then I'd only present it to HN after the work is finished.
Thanks for checking it out. Yes I totally agree on all fronts. This is indeed WIP, my hope in posting to HN is to get some assistance with said work - but you're right I should make that more clear.
I don't understand this, Martini has an awesome middleware that supports Google, Github, Facebook and LinkedIn out of the box:

https://github.com/martini-contrib/oauth2

with easy ways to check to see if a user is authenticated.

Gorm is an awesome choice, but this code just looks messy to me

Hey, thanks for your critique - I really appreciate you taking the time to check out the code. I wanted to be able to validate requests from a mobile application (or similar), rather than building an entire OAuth flow. I'm hoping this will offer a useful starting point to newcomers like myself who want to get something simple off the ground.