Skip to content

Commit 13c1c2c

Browse files
authored
Update README.md
1 parent 3671df2 commit 13c1c2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ If you check any of the boxes below:
9090
- [ ] you want Statsviz under `https://` rather than `http://`
9191
- [ ] you want Statsviz behind some middleware
9292

93-
Then you should get a `statsviz.Server` instance, by calling `statsviz.NewServer()`, so that you can directly do whatever you want with the `http.HandlerFunc` returned by the `Index()` and `Ws()` methods.
93+
Then you should call `statsviz.NewServer()` (with or without options depending on your use case) in order to access the `Index()` and `Ws()` methods.
9494

9595
```go
9696
srv, err := statsviz.NewServer(); // Create server or handle error
9797
if err != nil { /* handle error */ }
9898

9999
// Do something with the handlers.
100-
srv.Index() // UI (dashboard) http.HandlerFunc
101-
srv.Ws() // Websocket http.HandlerFunc
100+
srv.Index() // UI (dashboard) handler func
101+
srv.Ws() // Websocket handler func
102102
```
103103

104104
Examples for the following cases, and more, are found in the [\_example](./_example/README.md) directory:

0 commit comments

Comments
 (0)