安装和使用godef

I install godef:

$ go get -u github.com/rogpeppe/godef

Looks great:

$ which godef
/home/username/go/bin/godef

Right where I expect it:

$ echo $GOPATH
/home/username/go

But when called as a command line tool:

$ godef version
godef: cannot read : open : no such file or directory

What's happening?

I would suggest you to read the documentation found here: https://github.com/rogpeppe/godef/blob/master/doc.go

You can also try typing godef -h.

If you want more information, please explain what you are actually trying to do.

EDIT: Regarding your comment above, I think that this library can't help you to accomplish what you are trying to do.