fix(wordcount): jieba panic
Some checks failed
自动更新 nix 依赖 / gomod2nix update (push) Has been cancelled
最新版 / Build binary CI (386, linux) (push) Has been cancelled
最新版 / Build binary CI (386, windows) (push) Has been cancelled
最新版 / Build binary CI (amd64, linux) (push) Has been cancelled
最新版 / Build binary CI (amd64, windows) (push) Has been cancelled
最新版 / Build binary CI (arm, linux) (push) Has been cancelled
最新版 / Build binary CI (arm64, linux) (push) Has been cancelled
PushLint / lint (push) Has been cancelled

This commit is contained in:
源文雨 2025-10-02 16:42:59 +08:00
parent b8a57b80f2
commit 05345e4c13

View File

@ -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)
}