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