我正在尝试在基于golangcli的程序中实现this行为。 行为很简单,我只想在用户输入内容的同时打印一些内容到控制台。在
这是我写的代码。在
// %a code that reads the user input in a different thread%
fmt.Print("\r[*] this is a message.") // erases the current line then prints the message
fmt.Print("\n\r") // creates new empty line
fmt.Print(">>> " + %CURRENT_STDIN_LINE_BUFFER%) // prints the prompt ">>>" then writes the user input
唯一缺少的是readline.get_line_缓冲区()golang中的python函数。在
目前没有回答
相关问题 更多 >
编程相关推荐