diff --git a/Default.sublime-settings b/Default.sublime-settings index 1f4649c..781acfa 100644 --- a/Default.sublime-settings +++ b/Default.sublime-settings @@ -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 diff --git a/README.md b/README.md index fb1775d..c9e3433 100644 --- a/README.md +++ b/README.md @@ -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 ================================= diff --git a/goGuru.py b/goGuru.py index c2faba0..86a43ab 100644 --- a/goGuru.py +++ b/goGuru.py @@ -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)