Skip to content

Commit 41abe43

Browse files
committed
fix: 修正WebSocket连接URL格式
1 parent d2d2f3e commit 41abe43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/start/coding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
func main() {
2727
driver := driver.NewWSClient(1*time.Second, driver.WSnode{
28-
Url: "localhost:4000",
28+
Url: "ws://localhost:4000",
2929
})
3030
bot := nsx.Default(driver)
3131
bot.Run(context.Background())
@@ -61,7 +61,7 @@ go get -u github.com/openai/openai-go
6161
```go
6262
func main() {
6363
driver := driver.NewWSClient(1*time.Second, driver.WSnode{
64-
Url: "localhost:4000",
64+
Url: "ws://localhost:4000",
6565
})
6666
bot := nsx.Default(driver)
6767
pvt := nsx.OnEvent[event.PrivateMessage](bot)

0 commit comments

Comments
 (0)