A method of PubSub that updates the chat room by subscribing to the new topic
()
| 204 | // A method of PubSub that updates the chat |
| 205 | // room by subscribing to the new topic |
| 206 | func (cr *PubSub) Exit() { |
| 207 | defer cr.pscancel() |
| 208 | |
| 209 | // Cancel the existing subscription |
| 210 | cr.psub.Cancel() |
| 211 | // Close the topic handler |
| 212 | cr.pstopic.Close() |
| 213 | } |
| 214 | |
| 215 | // A method of PubSub that updates the chat user name |
| 216 | func (cr *PubSub) UpdateUser(username string) { |
no test coverage detected