Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Show HN: Example implementation of Mozilla's persona and Go server
(
github.com/sauerbraten
)
38 points
by
sauerbraten
on May 23, 2013
|
hide
|
past
|
favorite
|
6 comments
trebor
on May 23, 2013
|
next
[–]
I didn't realize this, but this is a Persona client library not a Persona server. Not sure why I confused them, but figure it was worth mentioning.
sauerbraten
on May 23, 2013
|
parent
|
next
[–]
Yeah, I worded it differently when I submitted it to /r/golang: Example of using Mozilla's persona with Go
krf
on May 23, 2013
|
prev
[–]
I'm new to Go but shouldn't the defer rawResp.Body.Close() be done after the error checking. If there is an error wouldn't rawResp be nil ?
sauerbraten
on May 23, 2013
|
parent
|
next
[–]
You're right. Fixed it, thanks!
realrocker
on May 23, 2013
|
parent
|
prev
[–]
Yup. It should be closed or it will probably leak memory in a few hours.
sauerbraten
on May 23, 2013
|
root
|
parent
[–]
Not really. Memory would only be leaked if there really was an error and rawResp was still nil. Since this usually doesn't happen (at least it never happened to me), you probably wouldn't even have noticed this bug.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: