Search code examples
gogoland

Goland run/re-run command from button click


I am using go run command to execute my go file manually.

Running main.go file in web directory: go run ./cmd/web

After any changes: Ctrl + C and then go run ./cmd/web again

Is there a way to do It from button in Goland? Or maybe automatically when go code changes?


Solution

  • You can read the help article on how to run applications/tests directly from the IDE, without having to type the go run command.

    As a quick reference:

    In the left gutter of the editor, click the Run application icon the Run Application icon and select Run < method_name > in < file_name >.