英文:
Starting a process on Windows from Go
问题
有没有可能从Google Go启动一个Windows进程?我正在寻找一个Go包,其中包含类似于C# System.Process类型的东西,或者一些实现相同结果的替代方法。
英文:
Is it possible to start a windows process from Google Go? I´m looking for a Go package that contains something similar to C# System.Process type, or some alternative method of achieving the same result.
答案1
得分: 6
Go还有一个Process类型。您可以使用os包的StartProcess函数创建一个新的进程。或者,您也可以使用os/exec包的Cmd结构,这样会更容易使用。
英文:
Go has also a Process type. You can use the StartProcess function of the os package to create a new one. Alternatively, you can also use the Cmd struct of the os/exec package which is a bit easier to use.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论