Skip to content

Commit

Permalink
fixes #41 and others
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarolm committed Nov 27, 2019
1 parent eb67f4f commit 9fa172b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Default.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"goguru_version" : "0.1.21", // DO NOT MODIFY
"goguru_version" : "0.1.22", // DO NOT MODIFY
// Please do not edit this file, instead use the user config.

// use golangconfig, if false then shellenv will be used to get golang environment variables
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@ GoGuru relies on the guru tool. You must install it in order for GoGuru to work.
`go get -u golang.org/x/tools/cmd/guru`


About Go Guru
---------------

- [User Manual](https://docs.google.com/document/d/1SLk36YRjjMgKqe490mSRzOPYEDe0Y_WQNRv-EiFYUyw/view#)
- [Design Document](https://docs.google.com/a/canonical.com/document/d/1WmMHBUjQiuy15JfEnT8YBROQmEv-7K6bV-Y_K53oi5Y/edit#heading=h.m6dk5m56ri4e)
- [GoDoc](https://godoc.org/golang.org/x/tools/cmd/oracle)


Copyright, License & Contributors
=================================

Expand Down
6 changes: 5 additions & 1 deletion goGuru.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ def guru(self, end_offset, begin_offset=None, mode="describe", callback=None):
file_path = self.view.file_name()

if useCurrentPackage:
GOPATH = os.path.realpath(cmd_env["GOPATH"])
try:
GOPATH = os.path.realpath(cmd_env["GOPATH"])
except:
log("WARNING: using default GOPATH since it isn't declared ($HOME/go)")
GOPATH = os.path.expanduser("~/go")
debug("GOPATH", GOPATH)

local_package = get_local_package(GOPATH, file_path)
Expand Down

0 comments on commit 9fa172b

Please sign in to comment.