You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Run the application: `go run main.go`. You should be able to enter a channel name, username, and send messages to yourself.
174
+
170
175

171
176
172
177
6. Now we need to integrate PubNub to send messages to other users and receive messages.
173
-
7. You need PubNub API Keys. This allows the chat communication over a data stream network. You can fill in the YOUR_PUBLISH_API_KEY and YOUR_SUBSCRIBE_API_KEY placeholder strings with your API keys that you get on the (PubNub website)[http://pubnub.com/].
178
+
7. You need PubNub API Keys. This allows the chat communication over a data stream network. You can fill in the YOUR_PUBLISH_API_KEY and YOUR_SUBSCRIBE_API_KEY placeholder strings with your API keys that you get on the [PubNub website](http://pubnub.com/).
174
179
8. Import the PubNub messaging package and the encoding/json package.
175
180
```
176
181
"github.com/pubnub/go/messaging"
@@ -218,6 +223,44 @@ go func() {
218
223
}
219
224
}()
220
225
```
226
+
11. Change your enter key binding function to send messages to PubNub instead of displaying them in the output. The messages will display in the output if they are succesfully sent to PubNub and received by pubnub.Subscribe() function.
0 commit comments