From 0cac4e4994a3a1097e9c22b79da1df78fab272c8 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 6 Mar 2017 22:28:16 +0100 Subject: [PATCH] explain use of goimports better --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 841fc1a..1e48609 100644 --- a/main.go +++ b/main.go @@ -181,8 +181,8 @@ func (cfg *Config) process() (code []byte, err error) { } } - // Generate and format the output. - // Use goimports to format the source because it separates imports. + // Generate and format the output. Formatting uses goimports because it + // removes unused imports. code = genPackage(mtyp) opt := &imports.Options{Comments: true, TabIndent: true, TabWidth: 8} code, err = imports.Process("", code, opt)