Import re-formatter
This repository has been archived on 2023-11-08. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
jolheiser 587759243a
ci/woodpecker/push/goreleaser Pipeline was successful Details
fix: empty module
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-07-16 22:56:33 -05:00
.woodpecker Updates 2022-08-09 13:46:36 -05:00
format feat: remove extra whitespace, clean up deps, and add optional gofumpt formatting 2023-07-16 14:49:44 -05:00
.gitignore Updates 2022-08-09 13:46:36 -05:00
.goreleaser.yaml Updates 2022-08-09 13:46:36 -05:00
.impignore Convert to glob-file for exclusions 2020-05-06 20:00:12 -05:00
README.md feat: remove extra whitespace, clean up deps, and add optional gofumpt formatting 2023-07-16 14:49:44 -05:00
go.mod feat: remove extra whitespace, clean up deps, and add optional gofumpt formatting 2023-07-16 14:49:44 -05:00
go.sum feat: remove extra whitespace, clean up deps, and add optional gofumpt formatting 2023-07-16 14:49:44 -05:00
imp.go fix: empty module 2023-07-16 22:56:33 -05:00
main.go fix: empty module 2023-07-16 22:56:33 -05:00

README.md

imp

imp is an opinionated import formatter

The order it follows is:

import (
    <stdlib>
    
    <this module's packages>
    
    <other module's packages>
)

imp includes five flags:

  • --write will write out the formatting rather than printing
  • --ignore reads a .impignore file for globs to include/exclude (.impignore by default)
  • --stdin will read from stdin and print to stdout
  • --gofumpt will also format using gofumpt
  • --gofumpt-extra will include gofumpt extra rules

.impignore format

The .impignore file follows a globber format, which closely resembles a traditional .gitignore file.