How to run all .go files within current directory through the command line (multi file package)

前端 未结 11 2590
滥情空心
滥情空心 2020-12-08 01:49

I\'m a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size.

go r

11条回答
  •  余生分开走
    2020-12-08 02:36

    For window the following works: Open cmd and go to the path where your folder exists. Then type the following command and press Enter.

    go build
    

    after this one executable will be created. Then in the command prompt call the executable. If your executable name is Project.exe then type the following and press Enter:

    Project.exe
    

提交回复
热议问题