Skip to content

Commit c882a49

Browse files
committed
gopls/doc: fix rendering of example for the infertypeargs analyzer
Fixes golang/go#49774 Change-Id: I10d2ebd9d831325e0ede73cf11ff30b2adfb744d Reviewed-on: https://go-review.googlesource.com/c/tools/+/367844 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent f64c0f4 commit c882a49

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

gopls/doc/analyzers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ check for unnecessary type arguments in call expressions
191191
Explicit type arguments may be omitted from call expressions if they can be
192192
inferred from function arguments, or from other type arguments:
193193

194-
func f[T any](T) {}
195-
196-
func _() {
197-
f[string]("foo") // string could be inferred
198-
}
194+
func f[T any](T) {}
195+
196+
func _() {
197+
f[string]("foo") // string could be inferred
198+
}
199199

200200

201201
**Enabled by default.**

internal/lsp/analysis/infertypeargs/infertypeargs.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const Doc = `check for unnecessary type arguments in call expressions
1616
Explicit type arguments may be omitted from call expressions if they can be
1717
inferred from function arguments, or from other type arguments:
1818
19-
func f[T any](T) {}
20-
21-
func _() {
22-
f[string]("foo") // string could be inferred
23-
}
19+
func f[T any](T) {}
20+
21+
func _() {
22+
f[string]("foo") // string could be inferred
23+
}
2424
`
2525

2626
var Analyzer = &analysis.Analyzer{

internal/lsp/source/api_json.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)