Skip to content

Commit a12ad2f

Browse files
Fix example spaces vs tabs
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent 932ee46 commit a12ad2f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/events.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,35 +211,35 @@ func printToConsoleHandler(_ int, msg []byte) error {
211211
}
212212

213213
func main() {
214-
// Set up the context to listen for signals.
214+
// Set up the context to listen for signals.
215215
ctx, stop := signal.NotifyContext(context.Background(), signals...)
216216
defer stop()
217217

218-
// This is the JWT token you got from the curl command above.
218+
// This is the JWT token you got from the curl command above.
219219
token := "superSecretJWTToken"
220-
// The base URL of your GARM server
220+
// The base URL of your GARM server
221221
baseURL := "https://garm.example.com"
222-
// This is the path to the events endpoint
222+
// This is the path to the events endpoint
223223
pth := "/api/v1/ws/events"
224224

225-
// Instantiate the websocket reader
225+
// Instantiate the websocket reader
226226
reader, err := garmWs.NewReader(ctx, baseURL, pth, token, printToConsoleHandler)
227227
if err != nil {
228228
fmt.Println(err)
229229
return
230230
}
231231

232-
// Start the loop.
232+
// Start the loop.
233233
if err := reader.Start(); err != nil {
234234
fmt.Println(err)
235235
return
236236
}
237237

238-
// Set the filter to receive all events. You can use a more fine grained filter if you wish.
238+
// Set the filter to receive all events. You can use a more fine grained filter if you wish.
239239
reader.WriteMessage(websocket.TextMessage, []byte(`{"send-everything":true}`))
240240

241241
fmt.Println("Listening for events. Press Ctrl+C to stop.")
242-
// Wait for the context to be done.
242+
// Wait for the context to be done.
243243
<-ctx.Done()
244244
}
245245
```

0 commit comments

Comments
 (0)