buaazp / Godef

Plugin of sublime to use godef to go to definitions accurately.
BSD 3-Clause "New" or "Revised" License
82 stars 24 forks source link

Godef can't find decalrations under `net` package #18

Open jostyee opened 8 years ago

jostyee commented 8 years ago
=================[Godef]Begin=================
[Godef]INFO: using godef: /Users/me/go/bin/godef
[Godef]INFO: selcet_begin: 834 offset: 834
[Godef]INFO: spawning: /Users/me/go/bin/godef -f /Users/me/go/src/snippets/playground.go -o 834
[Godef]ERROR: no definition found: b'godef: no declaration found for net.ResolveUDPAddr\n'
=================[Godef] End =================

but working for fmt

=================[Godef]Begin=================
[Godef]INFO: using godef: /Users/me/go/bin/godef
[Godef]INFO: selcet_begin: 822 offset: 822
[Godef]INFO: spawning: /Users/me/go/bin/godef -f /Users/me/go/src/snippets/playground.go -o 822
[Godef]INFO: godef output: b'/usr/local/opt/go/libexec/src/fmt/print.go:263:6\n'
[Godef]INFO: opening definition at /usr/local/opt/go/libexec/src/fmt/print.go:263:6
=================[Godef] End =================
buaazp commented 7 years ago

I found the godef issue when "C" package in codes:

https://github.com/rogpeppe/godef/issues/41

And this PR works fine for me. Have a try:

https://github.com/rogpeppe/godef/pull/44