$ cat =go-find
#!/bin/bash     
foo=$(echo -e "package main\nvar _ = $1" | goimports)
godef -i -o $((${#foo}-1)) <<<"$foo"

$ go-find fmt.Scanner.Scan
/home/dominikh/go/src/pkg/fmt/scan.go:64:2

(defun go-find (name)
  (interactive "MIdentifier: ")
  (godef--find-file-line-column (shell-command-to-string (format "go-find %s" name)) nil))
Shared publiclyView activity