Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
Show HN: Example implementation of Mozilla's persona and Go server | Better HN
Show HN: Example implementation of Mozilla's persona and Go server
(opens in new tab)
(github.com)
38 points
sauerbraten
12y ago
6 comments
Share
6 comments
default
newest
oldest
trebor
12y ago
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
OP
12y ago
Yeah, I worded it differently when I submitted it to /r/golang: Example of using Mozilla's persona with Go
krf
12y ago
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
OP
12y ago
You're right. Fixed it, thanks!
realrocker
12y ago
Yup. It should be closed or it will probably leak memory in a few hours.
sauerbraten
OP
12y ago
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.
j
/
k
navigate · click thread line to collapse