init: 初始化仓库
This commit is contained in:
20
main.go
Normal file
20
main.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
wsclient "git.lxtend.com/qqbot/ws_client"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// 创建 WebSocket 客户端
|
||||
client, err := wsclient.NewWebSocketClient("ws", "localhost:3001", "")
|
||||
if err != nil {
|
||||
log.Fatal("Error creating WebSocket client:", err)
|
||||
}
|
||||
defer client.Close()
|
||||
for {
|
||||
time.Sleep(1000 * time.Second)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user