gopls
The official Go language server. More information: https://go.dev/gopls/.
- Start the language server:
gopls serve
- Show diagnostics for one or more files:
gopls check
- Format one or more files in-place:
gopls format
- Add missing and remove unused imports in a file in-place:
gopls imports
- Show the definition of the identifier at a specific line and column:
gopls definition ::
- List all references to the identifier at a specific line and column:
gopls references ::
- Rename the identifier at a specific line and column, writing the changes to the affected files:
gopls rename ::
- Display version:
gopls version
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
