Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Outline should exclude _ "blank identifier" #1889

Closed
mgood opened this issue Aug 28, 2018 · 4 comments
Closed

Outline should exclude _ "blank identifier" #1889

mgood opened this issue Aug 28, 2018 · 4 comments

Comments

@mgood
Copy link

mgood commented Aug 28, 2018

We use var _ in the top-level of some of our Go files for various reasons, most notably the "interface checks pattern" documented in Effective Go.

These should be excluded from the Outline view since they don't represent a real variable that can be referenced and they clutter the output.

For example this code will produce 3 entries for _ in the outline view:

package foo

var (
	_ io.Closer = Foo(nil)
	_ io.Closer = Bar(nil)
	_ io.Closer = Baz(nil)
)
@ramya-rao-a
Copy link
Contributor

Good point. PRs are welcome.

Code Pointers:

@ramya-rao-a
Copy link
Contributor

This issue has a PR:
#1893

@mgood
Copy link
Author

mgood commented Aug 31, 2018

Nice, thanks!

@ramya-rao-a
Copy link
Contributor

This but is now fixed in the latest update to this extension (0.6.90)

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants