Skip to content

Instantly share code, notes, and snippets.

@460s
460s / goimports.sh
Created March 11, 2021 17:15
Golang Imports. Removing all blank lines and regrouping
// Used at the root of the project
find . -type f -name *\.go -exec sed -i '/^import/,/)/ { /^$/ d }' {} \; && goimports -w .