{"repo":"incu6us/goimports-reviser","free":true,"listed":false,"github":"https://github.com/incu6us/goimports-reviser","clone":"git clone https://github.com/incu6us/goimports-reviser.git","description":"Right imports sorting & code formatting tool (goimports alternative)","language":"Go","stars":717,"topics":["golang","goimports","go","sort-goimports","gofmt","goimports-reviser"],"license":"MIT","category":"dev-tools","readme_excerpt":"🇺🇦 #StandWithUkraine 🇺🇦 --- goimports-reviser &url=https://github.com/incu6us/goimports-reviser&hashtags=golang,code,goimports-reviser,goimports,gofmt,developers) Tool for Golang to sort goimports by 3-4 groups(with own linter): std, general, company(which is optional) and project dependencies. Also, formatting for your code will be prepared(so, you don't need to use gofmt or goimports separately). Use additional options -rm-unused to remove unused imports and -set-alias to rewrite import aliases for versioned packages or for packages with additional prefix/suffix(example: opentracing \"github.com/opentracing/opentracing-go\" ). -company-prefixes - will create group for company imports(libs inside your organization). Values should be comma-separated. Configuration: Cmd You can also apply rules to a dir or recursively apply using ./... as a target: You can also apply rules to multiple targets: Example, to configure it with JetBrains IDEs (via file watcher plugin): Options: Install With Go With Brew With Snap Examples Before usage: After usage: Comments(not Docs) for imports is acceptable. Example: Example with -company-prefixes -option Before usage: After usage: Example with -imports-order std,general,company,project,blanked,dotted -option Before usage: After usage: Example with -format -option Before usage: After usage: Example with -separate-named -option Before usage: After usage: --- Contributors A big thank you to all the amazing people who contributed! Give a Star! ⭐ I","default_branch":null,"files":null,"tree":[],"storefront":"/r/incu6us","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/incu6us/goimports-reviser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}