ParseUserId parses user ID of the form "usrXXXXXX".
(s string)
| 199 | |
| 200 | // ParseUserId parses user ID of the form "usrXXXXXX". |
| 201 | func ParseUserId(s string) Uid { |
| 202 | var uid Uid |
| 203 | if strings.HasPrefix(s, "usr") { |
| 204 | (&uid).UnmarshalText([]byte(s)[3:]) |
| 205 | } |
| 206 | return uid |
| 207 | } |
| 208 | |
| 209 | // GrpToChn converts group topic name to corresponding channel name. |
| 210 | // If it's a non-group channel topic, the name is returned unchanged. |
searching dependent graphs…