在golang中,如何通过双击启动exe的程序完成后保持控制台窗口打开

in windows when startup by double click the .exe and when the programe is done by os.Exit(...) so,is there anyway to keep the console window open,just like auto run an cmd command. I dontn want some solution with some PAUSE or some others thing to let it wait close.I need completed exit the program,and keep the console window .

BTW,I think some way of open another console window,but fail with this code

c :=exec.Command("start")

    if err := c.Run(); err != nil {
        fmt.Println("Error: ", err)
    }
    os.Exit(0)

</div>
查看全部
drrog9853
drrog9853
2016/05/06 12:21
  • windows
  • 点赞
  • 收藏
  • 回答
    私信

3个回复