Run Go code
Run & Debug popup: Ctrl0R
Run at caret: CtrlShift0R
You can run your Go code right from JetBrains Fleet provided that you have configured a SDK.
If you are not going to pass any parameters to your program, and your program does not require any specific actions to be performed before start, you can run it right from the editor.
Click the run icon in the gutter near the class or main method declaration and select Run.
Alternatively, place the caret at the class or main method that you want to run, and press CtrlShift0R
If you are going to pass parameters to your program or otherwise customize the startup of your program, use a run/debug configuration.
A run configuration specifies the parameters for running your application. It includes commands, executable paths, environment variables, arguments, and other necessary context.
Click the Run icon (Ctrl0R) and select Create Run Configurations in run.json.
In the run.json file that opens, define running or debugging parameters. If the file is empty, press AltEnter or click the file template link.
Alternatively, paste and edit the following code:
{ "configurations": [ { "type": "go", "name": "myApp", "goExecPath": "/usr/local/go/bin/go", "buildParams": [ "$PROJECT_DIR$/main.go" ] } ] }
Modify the configuration properties according to your environment.
For more information about Go run configurations in JetBrains Fleet, refer to Go run configurations.
Press Ctrl0R or select Run | Run & Debug from the main menu. Select the configuration that you are going to run or debug.
Click the Stop button in the tab of the running task.
Alternatively, close the tab, and select Terminate.
Press Ctrl0R. Run & Debug popup opens and lists the tasks. The tasks that are currently running are indicated with a green circle.
Thanks for your feedback!