1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:44:45 -07:00
go/internal/lsp/analysis
Rohan Challa e428a8eca3 internal/lsp/analysis: add simplify-composite-lit pass from "gofmt -s"
This is one of the simplifications that "gofmt -s" applies.
https://golang.org/cmd/gofmt/#hdr-The_simplify_command

An array, slice, or map composite literal of the form:
	[]T{T{}, T{}}
will be simplified to:
	[]T{{}, {}}

Updates golang/go#37221

Change-Id: I2dca46501983c8af3581c9319d973da5cf690388
Reviewed-on: https://go-review.googlesource.com/c/tools/+/223660
Run-TryBot: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-03-26 20:50:12 +00:00
..
simplifycompositelit internal/lsp/analysis: add simplify-composite-lit pass from "gofmt -s" 2020-03-26 20:50:12 +00:00
simplifyrange internal/lsp/analysis: add simplify-range pass from "gofmt -s" 2020-03-26 20:18:45 +00:00
unusedparams internal/lsp/analysis: add pass for unused parameters 2020-03-26 20:36:28 +00:00