News for hackers. Stuff that matters.
Re:Show HN: Example implementation of Mozilla's persona and ... by trebor on Thursday May 23, 2013 @01:25PM (#5758067)
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.
Re:Show HN: Example implementation of Mozilla's persona and ... by sauerbraten on Thursday May 23, 2013 @01:34PM (#5758128)
Yeah, I worded it differently when I submitted it to /r/golang: Example of using Mozilla's persona with Go
Re:Show HN: Example implementation of Mozilla's persona and ... by krf on Thursday May 23, 2013 @02:10PM (#5758407)
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 ?
Re:Show HN: Example implementation of Mozilla's persona and ... by sauerbraten on Thursday May 23, 2013 @02:18PM (#5758468)
You're right. Fixed it, thanks!
Re:Show HN: Example implementation of Mozilla's persona and ... by realrocker on Thursday May 23, 2013 @02:20PM (#5758478)
Yup. It should be closed or it will probably leak memory in a few hours.
Re:Show HN: Example implementation of Mozilla's persona and ... by sauerbraten on Thursday May 23, 2013 @02:35PM (#5758583)
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.