   "Return t if point is inside an anonymous function, nil otherwise."
   (save-excursion
     (go-goto-function)
-    (looking-at "func(")))
+    (looking-at "\\<func(")))
 
 (define-prefix-command 'go-goto-map)
 (define-key go-mode-map (kbd "C-c C-g") 'go-goto-map)


      ;; 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))


(defun go--in-function-p (compare-point)
  "Return t if COMPARE-POINT lies inside the function immediately surrounding point."
  (save-excursion
    (when (not (looking-at "\\<func\\>"))
      (go-goto-function))
    (let ((start (point)))
      (go--goto-opening-curly-brace)
