Hi,

(disclaimer: This is a nit)

in the Code Review Comments
<https://github.com/golang/go/wiki/CodeReviewComments#gofmt>, we are
recommending that people use gofmt, giving goimports as an alternative.
That makes me somewhat uncomfortable, as while each itself is idempotent,
gofmt clean code might be reformatted by goimports. For example, this code
<https://play.golang.org/p/DZAEc8xdbf> will not be reformatted by gofmt,
but will be by goimports. Thus, someone might do everything "right", but
still unintentionally cause a whitespace-only change in a later commit. I
see three possibilities:
a) leave it up to individual repo owners to decide whether to enforce gofmt
or the stricter goimports (or enforce neither)
b) recommend goimports universally
c) add goimports regrouping of imports to gofmt

a) makes the me queasy. I understand why b) is not necessarily desirable,
as organizations with large GOPATHs might cause goimports to have
false-positive replacements. Personally, I'd like c).
Am I alone in being bothered by this? ^^

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to