Documentation ¶
Overview ¶
Package simplifycompositelit defines an Analyzer that simplifies composite literals. https://github.com/golang/go/blob/master/src/cmd/gofmt/simplify.go https://golang.org/cmd/gofmt/#hdr-The_simplify_command
Analyzer simplifycompositelit ¶
simplifycompositelit: check for composite literal simplifications
An array, slice, or map composite literal of the form:
[]T{T{}, T{}}
will be simplified to:
[]T{{}, {}}
This is one of the simplifications that "gofmt -s" applies.
Package simplifycompositelit defines an Analyzer that simplifies composite literals. https://github.com/golang/go/blob/master/src/cmd/gofmt/simplify.go https://golang.org/cmd/gofmt/#hdr-The_simplify_command
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "simplifycompositelit", Doc: analysisinternal.MustExtractDoc(doc, "simplifycompositelit"), Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, URL: "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/simplifycompositelit", }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.