goimports-reviser is a command-line tool for organising imports in Go source code according to configurable grouping rules. It distinguishes standard-library imports from general dependencies, project dependencies, and optional company-specific packages, giving projects more control over import layout than a simple alphabetical pass.
The program can also perform source formatting, allowing import organisation and code cleanup to be combined in one workflow. It accepts individual files, directories, recursive targets, and multiple paths, making it suitable for editor integration and repository-wide checks.
This is free and open source software.
Key Features
- Sorts standard, general, company, and project imports into groups.
- Allows the order of import groups to be customised.
- Can separate blank imports and dot imports into groups.
- Supports company package prefixes.
- Can remove unused imports.
- Can set aliases for versioned or specially named packages.
- Offers optional source formatting alongside import reorganisation.
- Processes files, directories, recursive targets, and multiple paths.
- Supports file and directory exclusions.
- Can list files whose contents need changes.
- Can separate explicitly named imports from their normal groups.
- Supports file, write, and standard-output modes.
- Provides an exit-status mode for automated checks.
Website: github.com/incu6us/goimports-reviser
Support:
Developer: Vyacheslav Pryimak
License: MIT License
goimports-reviser is written in Go. Learn Go with our recommended free books and free tutorials.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.