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

Does not support go1.4 #3

Closed unknwon closed 9 years ago

unknwon commented 9 years ago

before Go 1.4, STD path was src/pkg, but after Go 1.4, it became src only.

buaazp commented 9 years ago

I have tested Godef plugin with Go 1.4rc1 on Mac OS. But there is no problem.

=================[Godef]Begin=================
[Godef]INFO: godef found at/Users/zippo/develop/GO/bin/godef
[Godef]INFO: using godef:/Users/zippo/develop/GO/bin/godef
[Godef]INFO: selcet_begin: 2202 offset: 2202
[Godef]INFO: spawning: /Users/zippo/develop/GO/bin/godef -f /Users/zippo/develop/GO/src/github.com/buaazp/pmq/dash.go -o 2202
[Godef]INFO: godef output: b'/usr/local/Cellar/go/1.4rc1/libexec/src/fmt/print.go:201:6\n'
[Godef]INFO: opening definition at /usr/local/Cellar/go/1.4rc1/libexec/src/fmt/print.go:201:6
=================[Godef] End =================

I need your logs to get more information.

Press `ctrl +`` to open console, and try Godef again. Copy the logs so I can find out the reason.

unknwon commented 9 years ago

I didn't mean it stops working, I mean go1.4 changes STD path, from $GOROOT/src/pkg to $GOROOT/src.

cuigh commented 9 years ago

You can change codes of godef by yourself, line 49 in file "godef.go":

gopath = append(gopath, r+"/src")

then rebuild godef