修复消息发送时缺少换行符的问题;更新 go.mod 文件以移除间接依赖注释

This commit is contained in:
yangyudong 2025-06-02 22:36:53 +08:00
parent 79efdbe38f
commit edf617adf0
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ func main() {
fmt.Println("退出客户端") fmt.Println("退出客户端")
break break
} }
_, err := conn.Write([]byte(text)) _, err := conn.Write([]byte(text + "\n"))
if err != nil { if err != nil {
log.Printf("发送消息失败: %v", err) log.Printf("发送消息失败: %v", err)
break break

4
go.mod
View File

@ -3,6 +3,6 @@ module chatv1
go 1.24.0 go 1.24.0
require ( require (
github.com/mattn/go-sqlite3 v1.14.28 // indirect github.com/mattn/go-sqlite3 v1.14.28
golang.org/x/crypto v0.38.0 // indirect golang.org/x/crypto v0.38.0
) )