Skip to content

Commit

Permalink
👀 prepared for 0.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Karmenzind committed Jan 13, 2025
1 parent 83c9654 commit 245b807
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/kd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
// "github.com/kyokomi/emoji/v2"
)

var VERSION = "v0.0.12"
var VERSION = "v0.0.13"

func showPrompt() {
exename, err := pkg.GetExecutableBasename()
Expand Down
2 changes: 1 addition & 1 deletion internal/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func QueryDaemon(addr string, r *model.Result) error {

dr := r.ToDaemonResponse()
err = json.Unmarshal(message, &dr)
zap.S().Debugf("Message from server: %s", string(message))
zap.S().Debugf("Message from server: %q", string(message))
if err != nil {
return fmt.Errorf("解析daemon返回结果失败: %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func handleClient(conn net.Conn) {
return
}

d.EchoRun("Received: %s\n", recv)
zap.S().Debugf("Received: %q", recv)
q := model.TCPQuery{}
err = json.Unmarshal(recv, &q)
if err != nil {
Expand All @@ -87,7 +87,7 @@ func handleClient(conn net.Conn) {
reply, _ = json.Marshal(model.DaemonResponse{Error: fmt.Sprintf("序列化查询结果失败:%s", err)})
}

d.EchoRun("Sending to client: %s \n", reply)
zap.S().Debugf("Sending to client: %q", reply)
conn.Write(append(reply, '\n'))
conn.Close()
}
3 changes: 2 additions & 1 deletion plan.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# master plan

## wip

- 读文件加锁
- 指定port
- release增加version,aur判断此文件
- gitea镜像
- -t查询增加本地缓存,例如最近1000条

## short-term
- logger加上server/client标识
- 记录崩溃日志 if possible
- edit时候文件不存在,自动创建
- 重启改为signal
- 多source直接嵌套进列表
Expand Down

0 comments on commit 245b807

Please sign in to comment.