(#rpofvqa) @carsten@yarn.zn80.net I only had a quick look and this is all in no particular order:
- I’m sure
go fmt
would add a space after the comment marker//
.
- Go doc strings are supposed to start with the name of the variable etc (I’m not a fan of this, either).
- Sometimes
log.SetPrefix(…)
ends with a space, sometimes not.
- Some messages start capital, some don’t.
- Typo:
occurred
with doubler
.
- On lots of errors no appropriate status code is set.
- Some
err
can be scoped in theif
like that:if err := foo(); err != nil { … }
- The
<title>
s could be improved.
- I have no idea about redis, but
rclient.Set("user:"+username, …)
looks suspicious to me and reminds me of SQL injections.
10.
go cookie, err := r.Cookie("session_token") if err != nil { if err == http.ErrNoCookie { … return } }
doesn’t look complete. Also handle other errors? Or simplify without nil check.
#peei2mq