cmd/guru: report start and end positions for non-PkgName Objects

Most objects are declared by an identifier, so the end position is
start+len(name).  However, this heuristic doesn't work for PkgName
objects because a (non-renaming) import creates an object without an
identifier.

Fixes issue github.com/Microsoft/vscode-go#562

Change-Id: I0eb44ca33a643c910d97abbf700ea4c3cd23bb41
Reviewed-on: https://go-review.googlesource.com/32440
Reviewed-by: Robert Griesemer <gri@golang.org>
1 file changed