This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| // To subscribe to an event, pass this JSON text to the client through the WebSocket: | |
| { | |
| "body": { | |
| "eventName": "NameOfEvent" // Replace with an event name listed below | |
| }, | |
| "header": { | |
| "requestId": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx", // UUID | |
| "messagePurpose": "subscribe", | |
| "version": 1, // Protocol version (currently 1 as-of 1.0.2) |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project: