tools/go
haya14busa 8524ce5143 imports, go/ast/astutil: do not make grouped imports non-grouped when removing
import (
		"fmt"
		"strings"
	)

When deleting "fmt" import statement, code should be converted to the
following code.

	import (
		"strings"
	)

Instead of

	import "strings"

Diff becomes nicer by this change and it avoids that rewriting grouped
imports non-grouped may result in confusion comments.

Example:

	// comment 1
	import (
		"fmt"
	        // comment 2
		"strings"
	)

should be

	// comment 1
	import (
	        // comment 2
		"strings"
	)

instead of

	// comment 1
        // comment 2
	import "strings"

Fixes golang/go#18051

Change-Id: I3c07b70b657191eacf83c3197a965e587286c950
Reviewed-on: https://go-review.googlesource.com/36853
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-02-13 18:56:44 +00:00
..
ast/astutil imports, go/ast/astutil: do not make grouped imports non-grouped when removing 2017-02-13 18:56:44 +00:00
buildutil go/buildutil, cmd/guru: resolve symlinks in filenames through build.Context 2016-12-06 21:45:43 +00:00
callgraph tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: better error when reading exportdata directly from archive 2016-11-30 19:52:27 +00:00
gcimporter15 go/gcimporter15: update import/export to handle type aliases 2017-01-11 20:35:34 +00:00
internal/gccgoimporter go/internal/gccgoimporter: add missing testfile (fix 1.9 build) 2017-02-01 22:16:26 +00:00
loader tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
pointer tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
ssa tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
types/typeutil tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
vcs go/vcs: accept plain file for .vcs (instead of directory) 2016-10-13 13:57:49 +00:00