Hacker News new | past | comments | ask | show | jobs | submit login

Do you have a link to your source code? It would be interesting to see the difference in the actual code.



Here's a really basic Go web server I wrote that doesn't do much except log someone in via OAuth: https://github.com/ChimeraCoder/go-server-bootstrap

The only messy part is the OAuth callback, which I did manually instead of using one of the OAuth2 libraries, because at the time I was trying to identify a possible bug in an OAuth implementation.

Keep in mind that it's not the cleanest or most idiomatic Go code, but even that aside, it's relatively concise - and more importantly, straightforward to understand, even if you've never written Go before.


Yeah, an article like this is almost useless without being able to see the author's code and see why he came to the conclusions he came to.


The author didn't post this to HN. It's over 2 years old and reads like a "brain dump" type blog post.


Unless he's updated it, his 2 year old Go code won't compile any more. 2 years ago, Go was a rapidly-churning target. Now, it's settled off to Go 1, but you'll have to go through and fix some changes--and there may now be better ways to do things.


I'm sure you already know this, but for future readers: check out gofix [0] when you find yourself in this situation.

[0] http://golang.org/cmd/fix/

[1] http://blog.golang.org/2011/04/introducing-gofix.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: