Issue #199: Handling the case in scanning then GOPATH ends in a path separator
diff --git a/cmd/tree.go b/cmd/tree.go
index b5c3387..dac864b 100644
--- a/cmd/tree.go
+++ b/cmd/tree.go
@@ -198,7 +198,10 @@
 		for wd := abs; wd != "/"; wd = filepath.Dir(wd) {
 
 			// Don't look for packages outside the GOPATH
-			if wd == b.GOPATH {
+			// Note, the GOPATH may or may not end with the path separator.
+			// The output of filepath.Dir does not the the path separator on the
+			// end so we need to test both.
+			if wd == b.GOPATH || wd+string(os.PathSeparator) == b.GOPATH {
 				break
 			}
 			p = filepath.Join(wd, "vendor", filepath.FromSlash(name))