       (while (looking-at "^//")
         (forward-line 1))
       ;; If we are still not looking at a function, retry by calling self again.
-      (when (not (looking-at "func"))
+      (when (not (looking-at "\\<func\\>"))
         (go-goto-function arg)))
 
      ;; If we're already looking at an anonymous func, look for the
      ;; surrounding function.
-     ((and (looking-at "func")
-           (not (looking-at "^func")))
+     ((and (looking-at "\\<func\\>")
+           (not (looking-at "^func\\>")))
       (re-search-backward "\\<func\\>" nil t))
 
-     ((not (looking-at "func"))
+     ((not (looking-at "\\<func\\>"))
       ;; If point is on the "func" keyword, step back a word and retry
       (if (string= (symbol-name (symbol-at-point)) "func")
           (backward-word)

      ;; were not inside it but below it. If we were not inside it, we should
      ;; go to the containing function.
      (while (and (not (go--in-function-p p))
                  (not (looking-at "^func")))
        (go-goto-function arg)))))

  (cond


      ;; If nothing is found, assume that we are at the top of the file and
      ;; should search forward instead.
      (when (not (looking-at "\\<func\\>"))
        (re-search-forward "\\<func\\>" nil t)
        (forward-word -1))

