When I build in Terminal, I can use a flag to say I want to build for GUI:
go build -ldflags="-H windowsgui"
However, I just started using JetBrains Goland and I don't how to run GUI apps. What can I do?
go build
will only build the application.
To actually run the application, you should go to Run | Edit Configurations... | + | Go Application
and configure the application as you need.
Here you will need to set two options:
-ldflags="-H windowsgui"
to the Go tool arguments
optionOutput directory
to be in the same directory as your .manifest
fileSetting the output directory is critical in order to run the the application without encountering the following panic panic: TTM_ADDTOOL failed
described in this issue.
Then you can run the configuration via Run | Run...
and select the configuration you've just created.