diff --git a/go-bot b/go-bot new file mode 100755 index 0000000..99e9d5e Binary files /dev/null and b/go-bot differ diff --git a/workers/pkg.go b/workers/pkg.go index ee8cf78..cf84742 100644 --- a/workers/pkg.go +++ b/workers/pkg.go @@ -19,7 +19,7 @@ func (a *Pkg) GetMsg() string { return "请输入包名 如:/pkg linux 查询 linux 相关软件" } // 去除换行符 - raw_msg := strings.TrimRight(a.RawMsg, "\\n") + raw_msg := strings.TrimRight(a.RawMsg, "\n") fmt.Println("raw_msg:", raw_msg) parms := strings.Split(raw_msg, " ")