mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 22:40:23 +08:00
🐛 兼容linux和windows文件换行不同 (#199)
This commit is contained in:
parent
ccb58e0a6c
commit
3553683bb1
@ -48,7 +48,7 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("ERROR:", err))
|
ctx.SendChain(message.Text("ERROR:", err))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
stopwords = strings.Split(binary.BytesToString(data), "\r\n")
|
stopwords = strings.Split(strings.ReplaceAll(binary.BytesToString(data), "\r", ""), "\n")
|
||||||
sort.Strings(stopwords)
|
sort.Strings(stopwords)
|
||||||
logrus.Infoln("[wordcount]加载", len(stopwords), "条停用词")
|
logrus.Infoln("[wordcount]加载", len(stopwords), "条停用词")
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user