Settings

Theme

Show HN: Example implementation of Mozilla's persona and Go server

github.com

38 points by sauerbraten 13 years ago · 6 comments

Reader

trebor 13 years 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.

  • sauerbratenOP 13 years ago

    Yeah, I worded it differently when I submitted it to /r/golang: Example of using Mozilla's persona with Go

krf 13 years 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 ?

  • sauerbratenOP 13 years ago

    You're right. Fixed it, thanks!

  • realrocker 13 years ago

    Yup. It should be closed or it will probably leak memory in a few hours.

    • sauerbratenOP 13 years 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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection