全部。我正在Go中编写一个聊天客户端,作为我正在编写过程中的库的概念证明。它需要在相同的终端窗口中接受用户输入并打印传入的消息。考虑以下。
user@debian ~ $ ./client
no session> 192.168.1.100
> Hello, there!
Hi!
> So, did you get that feature working yet?
Nope. I thought you were going to ask on StackOverflow.
>> Yeah, I'm aski
如果在我键入内容时收到另一条消息,则应产生以下内容。
user@debian ~ $ ./client
no session> 192.168.1.100
> Hello, there!
Hi!
> So, did you get that feature working yet?
Nope. I thought you were going to ask on StackOverflow.
Or did you want me to?
>> Yeah, I'm aski
Go中有办法做到这一点吗?
弑天下
相关分类