-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #71 and supercedes #69. Handles the case described in #69 (comment), i.e. ``` $ cat <<EOF | ./godef -i -o 106 package main import "encoding/json" func xxxx() { type foo = json.Encoder x := new(foo) _ = x.Encode } EOF /usr/lib/go-1.10/src/encoding/json/stream.go:195:21 ``` i.e. it correctly finds the definition of `x.Encode` (offset 106 is on the `E`) Also: ``` $ cat <<EOF | ./godef -i -o 91 package main import "encoding/json" func xxxx() { type foo = json.Encoder x := new(foo) _ = x.Encode } EOF 4:10 ``` Where offset 91 is the `f` in `new(foo)` and `4:10` is the `json.Encoder`
- Loading branch information
Ian Campbell
committed
Mar 23, 2018
1 parent
b692db1
commit 8faf556
Showing
4 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters