@@ -22,27 +22,27 @@ Here is a minimal example Go code (you can find the full and up-to-date version
2222package main
2323
2424import (
25- " net/http"
25+ " net/http"
2626
27- " github.com/anycable/anycable-go/cli"
27+ " github.com/anycable/anycable-go/cli"
2828)
2929
3030func main () {
31- opts := []cli.Option {
32- cli.WithName (" AnyCable" ),
33- cli.WithDefaultRPCController (),
34- cli.WithDefaultBroker (),
35- cli.WithDefaultSubscriber (),
36- cli.WithDefaultBroadcaster (),
37- }
38-
39- c := cli.NewConfig ()
40- runner , _ := cli.NewRunner (c, opts)
41- anycable , _ := runner.Embed ()
42-
43- wsHandler , _ := anycable.WebSocketHandler ()
44- http.Handle (" /cable" , wsHandler)
45-
46- http.ListenAndServe (" :8080" , nil )
31+ opts := []cli.Option {
32+ cli.WithName (" AnyCable" ),
33+ cli.WithDefaultRPCController (),
34+ cli.WithDefaultBroker (),
35+ cli.WithDefaultSubscriber (),
36+ cli.WithDefaultBroadcaster (),
37+ }
38+
39+ c := cli.NewConfig ()
40+ runner , _ := cli.NewRunner (c, opts)
41+ anycable , _ := runner.Embed ()
42+
43+ wsHandler , _ := anycable.WebSocketHandler ()
44+ http.Handle (" /cable" , wsHandler)
45+
46+ http.ListenAndServe (" :8080" , nil )
4747}
4848```
0 commit comments