mirror of
https://github.com/golang/go
synced 2024-11-18 16:44:43 -07:00
imports: remove unnecessary string conversion
This change remove an unnecessary string conversion of a variable that is already a string. Change-Id: I64d9a6c059276fa22f1be9f2dba02bbeb63cb8fb Reviewed-on: https://go-review.googlesource.com/35560 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
fcfba28e23
commit
721f218496
@ -276,7 +276,7 @@ func addImportSpaces(r io.Reader, breaks []string) []byte {
|
|||||||
}
|
}
|
||||||
if inImports && len(breaks) > 0 {
|
if inImports && len(breaks) > 0 {
|
||||||
if m := impLine.FindStringSubmatch(s); m != nil {
|
if m := impLine.FindStringSubmatch(s); m != nil {
|
||||||
if m[1] == string(breaks[0]) {
|
if m[1] == breaks[0] {
|
||||||
out.WriteByte('\n')
|
out.WriteByte('\n')
|
||||||
breaks = breaks[1:]
|
breaks = breaks[1:]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user