From 05345e4c13fc981b0f763240560169e94f57bb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 2 Oct 2025 16:42:59 +0800 Subject: [PATCH] fix(wordcount): jieba panic --- plugin/wordcount/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/wordcount/main.go b/plugin/wordcount/main.go index 0333320b..dae704d2 100644 --- a/plugin/wordcount/main.go +++ b/plugin/wordcount/main.go @@ -46,8 +46,7 @@ func init() { if err != nil { panic(err) } - var seg jieba.Segmenter - err = seg.LoadUserDictionary(bytes.NewReader(dat)) + seg, err := jieba.LoadDictionary(bytes.NewReader(dat)) if err != nil { panic(err) }