From 51f6031bc85dc82b3200f14344724d13c4458e61 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 4 Mar 2015 15:48:16 +0100 Subject: [PATCH] fixed godef look up in gopath now godef only need to be in the PATH --- Godef.py | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/Godef.py b/Godef.py index f4a5845..04ddcda 100644 --- a/Godef.py +++ b/Godef.py @@ -5,32 +5,8 @@ def run(self): print("=================[Godef]Begin=================") settings = sublime.load_settings("Godef.sublime-settings") gopath = settings.get("gopath", os.getenv('GOPATH')) - if gopath is None: - print("[Godef]ERROR: no GOPATH defined") - print("=================[Godef] End =================") - return - - gopaths = gopath.split(":") - found = False - godefpath = "" - for path in gopaths: - godefpath = os.path.join(path, "bin", "godef") - - if not os.path.isfile(godefpath): - print("[Godef]WARN: godef not found at" + godefpath) - continue - else: - print("[Godef]INFO: godef found at" + godefpath) - found = True - break - - if found == False: - print("[Godef]ERROR: godef not found!") - print("=================[Godef] End =================") - return - else: - print("[Godef]INFO: using godef:" + godefpath) - + godefpath = "godef" + print("[Godef]INFO: using godef:" + godefpath) view = self.window.active_view() # row, col = view.rowcol(view.sel()[0].begin())