doc: fix node.New examples

This commit is contained in:
Ste Jones 2023-07-01 20:25:30 +01:00 committed by richΛrd
parent 47cdb86aaf
commit 49baff14cd
3 changed files with 6 additions and 12 deletions

View File

@ -15,15 +15,13 @@ import (
)
...
wakuNode, err := node.New(context.Background(),
node.WithWakuFilter(false),
)
wakuNode, err := node.New(node.WithWakuFilter(false))
if err != nil {
fmt.Println(err)
return
}
if err := wakuNode.Start(); err != nil {
if err := wakuNode.Start(context.Background()); err != nil {
fmt.Println(err)
return
}

View File

@ -25,15 +25,13 @@ import (
)
...
wakuNode, err := node.New(context.Background(),
node.WithLightPush(),
)
wakuNode, err := node.New(node.WithLightPush())
if err != nil {
fmt.Println(err)
return
}
if err := wakuNode.Start(); err != nil {
if err := wakuNode.Start(context.Background()); err != nil {
fmt.Println(err)
return
}

View File

@ -16,15 +16,13 @@ import (
)
...
wakuNode, err := node.New(context.Background(),
node.WithWakuRelay(),
)
wakuNode, err := node.New(node.WithWakuRelay())
if err != nil {
fmt.Println(err)
return
}
if err := wakuNode.Start(); err != nil {
if err := wakuNode.Start(context.Background()); err != nil {
fmt.Println(err)
return
}