英文:
Open multiple terminal windows from single program in Golang
问题
用例
我正在制作一个使用命令行界面的应用程序。
在一个终端窗口中,应向用户显示非静态信息。
在另一个终端窗口中,应向用户显示日志,并允许用户与其进行交互。
我的想法是,我可以使用通道在每个终端窗口运行的Go协程之间发送信息。
问题
在Golang中是否可以同时打开多个终端窗口?如果不行,是否有其他替代方案?
英文:
Usecase
I am making an app that makes use of a command line interface.
In one terminal window, non-static information should be displayed to the user.
In the other terminal window it should display logs to the user, as well as allowing them to interact with it.
My thinking is that I could then use channels to send information between the go routines that each terminal window runs on.
Question
Is it possible to open more than one terminal window at a time with Golang? If not, are there any alternatives?
答案1
得分: 1
也许你可以编写一个前端界面来显示命令,并通过HTTP API与后端进行通信。
英文:
Maybe you can write a frontend to show the commands and communicate with the backend through HTTP API.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论