You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
It would be great if VSCode was able to recognize a main function in a main package and automatically put a "run" button on it. Then, you can build the package, run it and show the output on the terminal tab.
The text was updated successfully, but these errors were encountered:
Interesting idea. The go extension currently offers code lens for test/benchmark functions, so this may be similar. But, my concern is that many programs need input, output, flags, and sometimes configuring the right execution environment, so, a simple run is not going to be helpful in many cases.
What about a run current file in terminal button similar to the python extension? (go run {filename}.go)
It is located in the upper right corner of the opened file only.
Forget about implementing inputs, outputs, flags, and configuring the execution environment. This would be useful for quick tests to confirm expected results from isolated functions in a small test.go file.
The ability to run the current file is available via the Run: Start Without Debugging command which I believe is mapped to Ctrl+F5 keybinding. This already suffers from the pitfalls of not taking any inputs, flags etc, but is considered helpful.
Having the codelens run would make the existing feature more visible and accessible.
It would be great if VSCode was able to recognize a main function in a main package and automatically put a "run" button on it. Then, you can build the package, run it and show the output on the terminal tab.
The text was updated successfully, but these errors were encountered: