nano
nano copied to clipboard
Someone who understands go and English PLEASE FIX DOCUMENTATION
The English in the documentation is very not good. As a beginner to golang and nano, I'm having a lot of trouble understanding it.
Eg;
While handling a message, the handler will receive two arguments, session corresponding a client and a message is the payload of this request that unmarshals by nano automatically.
While handling a message, the handler will receive two arguments, a session id corresponding to a client and a content indicating the payload of the request....
Okay? I had to read through it several times to understand that far.
However, you lost me at unmarshals.
If anyone knows both English and go and nano and can go through the docs it would be a great help...
Sorry for my bad English, I will improve the docs later.
func (c *Group) Member(uid int64) (*session.Session, error) { c.mu.RLock() defer c.mu.RUnlock()
for _, s := range c.sessions { // why no map[]
if s.UID() == uid {
return s, nil
}
}
return nil, ErrMemberNotFound
}