# go: Fix outline for methods with unnamed receivers \(\#58656\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/35ddcb2ecd07d38b1579c5199f175d0e9c2133f4)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 35ddcb2ecd07d38b1579c5199f175d0e9c2133f4

Requested commit: 35ddcb2ecd07d38b1579c5199f175d0e9c2133f4

Commit: 35ddcb2ecd07d38b1579c5199f175d0e9c2133f4

Tree: a044e915eedec221efe1872f350c91b14f81c911

Author: olegator888

Committer: GitHub

## Message

```
go: Fix outline for methods with unnamed receivers (#58656)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

This fixes Go outline extraction for methods whose receiver has no name,
such as `func (v2) Method()`. These methods are now included in outline
symbols, which also feed breadcrumbs and sticky
scroll.

Tested with:

- `cargo test -p languages`
- `cargo test -p grammars`
- `./script/clippy -p languages`
- `cargo fmt --check --package languages`

Before:

[before_cut.webm](https://github.com/user-attachments/assets/91eb5cb0-703a-4496-b0dd-5369c4c219fc)

After:

[after_cut.webm](https://github.com/user-attachments/assets/76d13d88-3671-4118-99fc-c073a6e64727)

Release Notes:

- Fixed Go methods with unnamed receivers not appearing in breadcrumbs
and sticky scroll.

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
```

## Parents

- [2243c13b9b224311fdb64362b2310c364f7dfbbb](https://git.cafe/gitcafe/zed/commit/2243c13b9b224311fdb64362b2310c364f7dfbbb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/35ddcb2ecd07d38b1579c5199f175d0e9c2133f4?format=markdown)
