goimports
Verified for current stable LTS
Goimports Commands
Goimports command syntax with verified terminal examples.
Commands
6 commands for Goimports
goimports Operations
Goimports Command: Display Completed Import Source File
goimports <path/to/file.go> goimports Operations
Goimports Command: Display Diffs And Write Back To Source File
goimports -w -d <path/to/file.go> goimports Operations
Goimports Command: Display Diffs And Write Result Back To Source File
goimports -w -d <path/to/file.go> goimports Operations
Goimports Command: Set Import Prefix After Third Party Packages
goimports -local <path/to/package1,path/to/package2,...> <path/to/file.go> goimports Search
Goimports Command: Set Import Prefix String
goimports -local <path/to/package1,path/to/package2,...> <path/to/file.go> goimports Operations
Goimports Command: Write Result Back To Source File
goimports -w <path/to/file.go> Suggest a Goimports Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common Goimports workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.