My Goland Log


goland series

Nov 04, 2021 Keyboard Remapping in Goland
Jul 19, 2021 My Goland Log


This is a log of my second journey in using Goland from Jetbrains for Go development.

I’ve got VSCode in a great state. It’s flexible, powerful, and I’ve highly customized it to my workflow.

However, doing Go development, I’d like to better explore Jetbrains Goland and see if the experience proves positive.

I’ll log updates and issues here as I work through it in the hope that it might provide you better information if you are considering Goland as well.

Emoji Definition
🔴 Not solved yet
🟠 Issue or behavior unclear
🚩 It’s an issue I believe I understand but don’t like the answer to
✅ Understand and no issues with behavior
 Testing

🔴 Not certain yet how to run multi-module repo based tests through project (VSCode supports with experimental flag).

✅ Run individual directory test. This also generates a run configuration (ephemeral) that can be persisted as a test configuration for the project.

test output
Test output view is very polished

test coverage on file list
Test Coverage on file list

✅ Toggle auto-run for testing is possible, so upon save, it will run after a 1 second delay. The built in test renderer is better than VSCode’s Go test output. Not only does it render the test with color[^vscode-go-testoutput] but also organizes into a nice test explorer view.

Overall, the test output is polished, able to be undocked and run in a separate window. Works well for a TDD workflow.

Goland Test Coverage
test coverage

@s0xzwasd provided some great insight on the different approach in the comments on this page. Compound configurations work well to run multiple sets of test when using multiple modules in the same repo. I tried this, and while tedious to click through the first time, It’s easier to configure from a UI standpoint than trying to work through the VSCode tasks.json schema and build tasks by hand.

Goland Compound Test Coverage Explorer Output
Compound test coverage

 Run Configurations

🔴 Not able to set dynamic $FileDir$ in the run configurations it seems.

🟠 Project configuration resolves path to relative once saved, but displays with absolute. This is confusing.

✅ Can include configuration in project so anyone that opens in Goland can run the same prebuilt tasks.

 Linting
🟠 Working on golangci-lint integration. There is an extension and I’ve also configured the FileWatcher to run on save, but neither is working as seamlessly as VSCode setting as the gopls linter tool.
 Refactoring & Fixes
🟠 Can’t find a way to assign intentions to a keyboard shortcut. For example, Add a Go Comment header requires a click on a lightbulb icon, and can’t find a way to allow this to be triggered by a keyboard shortcut.

Webmentions

(No webmentions yet.)