예제 #1
0
func interactiveQueryHandler() {
	for {
		// displays the bot's specified name on the left of stdio screen
		botName := fmt.Sprintf("\x1b[01;33m%s > \x1b[0m", *id)
		inpLine := readline.ReadLine(&botName)

		if inpLine == nil {
			fmt.Println("There seems some issue.")
			continue
		}

		if input = strings.TrimSpace(*inpLine); input != "" {
			readline.AddHistory(input)
		}

		extensions.EvalQuery(input)
	}
}
예제 #2
0
func cliQueryHandler(input string) { extensions.EvalQuery(input) }