28 lines
529 B
Go
28 lines
529 B
Go
package main
|
||
|
||
import (
|
||
"bufio"
|
||
"fmt"
|
||
"go-bot/workers"
|
||
"os"
|
||
"strings"
|
||
)
|
||
|
||
func main() {
|
||
for {
|
||
reader := bufio.NewReader(os.Stdin)
|
||
|
||
fmt.Print("输入指令(不要带/):")
|
||
raw_msg, _ := reader.ReadString('\n')
|
||
// 去除末尾的换行符
|
||
// raw_msg = strings.TrimRight(raw_msg, "\r\n")
|
||
|
||
parms := strings.Fields(raw_msg)
|
||
|
||
worker := workers.NewWorker(parms, "11", "111", "111", "222", raw_msg)
|
||
fmt.Println("Test:", worker.CheckPermission())
|
||
message := worker.GetMsg()
|
||
fmt.Println("message:", message)
|
||
|
||
}
|
||
}
|