goland 配置外部工具

https://www.jetbrains.com/help/go/run-debug-configuration.html#createExplicitly



https://github.com/cweill/gotests



Open the Run/Debug Configuration dialog in one of the following ways:










Select Run Edit Configurations from the main menu.










With the Navigation bar visible (View Appearance Navigation Bar ), choose Edit Configurations from the run/debug configuration selector.


Press ⌃⌥R, then press 0 or select the configuration from the popup and press ⌘↓.



In the Run/Debug Configuration dialog, click Icons general add on the toolbar or press ⌘N. The list shows the run/debug configuration templates. Select Go build.



Specify the run/debug configuration name in the Name field. This name will be shown in the list of the available run/debug configurations.



On the Configuration tab, you can set the following options:



Run kind: a building scope for your application. File and Package scopes work similarly in tests and compilation/running configurations (in terms of the scope they cover).



Directory: build an application in the specified directory as a package, without processing any subdirectories.



For test configurations, GoLand runs all the tests in the specified directory and all its subdirectories.










File: build an application from files specified in the Files field. To pass multiple file paths, use the vertical bar ( ) as a delimiter. This configuration is automatically selected when you run your program from scratch files.


Package: build a single package with all its dependencies. Specify a full import path to the package that you want to build in the Package path field (for example, github.com/gorilla/mux ). This configuration is automatically selected when you run the main function or a separate test by using the Run icon (the Run button) in the gutter.



Package path: a full import path of the package that you want to compile (for example, github.com/gorilla/mux ). This field is available only when you select the Package run kind.



You can press ⌃Space to see a list of available packages.

-only $SelectedText$ -w $FileNameWithoutAllExtensions$_test.go $FileName$



$FileDir$



External tools



preference»Tools»External Tools


Category golang