Open averrin opened 8 years ago
if it helps
❯ gogetdoc -pos $GOROOT/src/fmt/format.go:#6274
gogetdoc: no documentation found
❯ la $GOROOT/src/fmt/format.go
-rw-r--r-- 1 root root 12K авг 16 01:47 /usr/local/go/src/fmt/format.go
❯ go version
go version go1.7 linux/amd6
What version of the godoc plugin are you running? Is your GOPATH set correctly?
godoc version: 0.3.1
❯ echo $GOPATH
/home/user/projects/go
other go-plus tools works nice
If GOPATH is /home/user/projects/go, then your source code should be at /home/user/projects/go/src.
In the screenshot above, it looks like your code is at /home/user/projects/shodan, which is outside your GOPATH.
The 6274 offset in format.go was a good example for Go 1.6, but the Go 1.7 source has changed. Try this from the command line:
❯ gogetdoc -pos "$GOROOT/src/fmt/format.go:#2352"
import "unicode/utf8"
func RuneCountInString(s string) (n int)
RuneCountInString is like RuneCount but its input is a string.
I have symlink from /home/user/projects/shodan to /home/user/projects/go/src/github.com/averrin/shodan
So, with this offset gogetdoc works:
gogetdoc -pos "$GOROOT/src/fmt/format.go:#2352"
import "unicode/utf8"
func RuneCountInString(s string) (n int)
RuneCountInString is like RuneCount but its input is a string.
So the symlink is the issue. We don't currently support symlinks, but I will look into what we need to do to make this happen as you aren't the first to run into this.
Set cursor to log.Println toggle godoc
Atom: 1.10-beta6 Theme: Accents Syntax: Base16 Tomorrow Dark