GoLand: Difference between revisions
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
There's also a bottom-right "Tab" control. | There's also a bottom-right "Tab" control. | ||
Note that by default the IDE is configured to run <code>gofmt</code> on "Reformat Code action" and <code>gofmt</code> replaces spaces with tabs. This is the convention, see: {{Internal|Go_Tool#fmt|<tt>go fmt</tt>}} |
Revision as of 20:12, 19 December 2023
Internal
Overview
Building
Also see:
Module-Aware or GOPATH Mode
Module-aware mode is turned on by default.
To turn it off: Preferences → Go → Go Modules → Turn off "Enable Go modules integration".
Then set the correct GOPATH in Preferences → Go → GOPATH → Project GOPATH.
For more details see:
Turn Off "Optimize Imports oh the Fly"
Does not seem to work, must be set somewhere else.
Preferences → Go → Imports → Uncheck "Optimize imports on the fly"
Setup Debugging for a Project
Tabs and Indents
Editor → Code Style → Go → Tabs and Indents → Uncheck "Use tab character"
There's also a bottom-right "Tab" control.
Note that by default the IDE is configured to run gofmt
on "Reformat Code action" and gofmt
replaces spaces with tabs. This is the convention, see: