Home > other >  Goland 2019 generated executable files in the current project directory
Goland 2019 generated executable files in the current project directory

Time:10-06

Because to read the project files in the directory, but it is not in the reading of the current directory folder, this how broken

CodePudding user response:

CodePudding user response:

Directly using the go build command line add some parameters also
Such as
 go build - o client. Exe client/main 
executable file is in the client folder

CodePudding user response:

There is one of the most simple and crude way
In the main. Go directory
A go build it, what all don't need to add

CodePudding user response:

1/f, reference and 蘤 old crepe response:

This method, which can be generated under different project in different directories?

CodePudding user response:

references and 蘤 old crepe reply: 3/f
there is one of the most simple and crude way to
In the main. Go directory
A go build it, what all need not add

No matter use,
I am such operation, engine. LoadHTMLGlob (filepath. Join (getCurrentDirectory (), "./template/* */* "))
GetCurrentDirectory this returns the current directory

CodePudding user response:

reference 4 floor jay_2008 response:
Quote: 1/f, reference and 蘤 old crepe response:


This method, which can be generated under different project in different directories,

This is just a run configuration, you own run configuration can be set for each project, in fact if you open the module pattern, point the run button, it will force you to set into the model, namely the run directory, rather than running the file

 
Engine. LoadHTMLGlob (filepath. Join (getCurrentDirectory (), "./template//* * * "))
GetCurrentDirectory this returns the current directory


This thing is from the location of the first argument to the positioning of the second parameter, please ~ ~
I mean go build exe file will be created in the directory, enter the default the current path is actually the order as the main package, which is run package
If you have a lot of level directory, such as 1/2/SRC/project/main, the meaning of the executable files in the current directory should be under the project, rather than in the main directory

CodePudding user response:

After the run configuration Settings, you can't get point run in front of the main function button, the button becomes a new run configuration, choose the required configuration to the upper right, and then run
  • Related