Skip to content

Commit

Permalink
simplify godef--successful-p
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh committed Jun 17, 2014
1 parent e639832 commit 1071ac6
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions go-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1075,17 +1075,10 @@ description at POINT."
(split-string (buffer-substring-no-properties (point-min) (point-max)) "\n")))))

(defun godef--successful-p (output)
(cond
((string= "-" output)
nil)
((string= "godef: no identifier found" output)
nil)
((go--string-prefix-p "godef: no declaration found for " output)
nil)
((go--string-prefix-p "error finding import path for " output)
nil)
(t
t)))
(not (or (string= "-" output)
(string= "godef: no identifier found" output)
(go--string-prefix-p "godef: no declaration found for " output)
(go--string-prefix-p "error finding import path for " output))))

(defun godef--error (output)
(cond
Expand Down

0 comments on commit 1071ac6

Please sign in to comment.