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))
|
||||
return false
|
||||
}
|
||||
stopwords = strings.Split(binary.BytesToString(data), "\r\n")
|
||||
stopwords = strings.Split(strings.ReplaceAll(binary.BytesToString(data), "\r", ""), "\n")
|
||||
sort.Strings(stopwords)
|
||||
logrus.Infoln("[wordcount]加载", len(stopwords), "条停用词")
|
||||
return true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user