     (insert (format "// %s " (go--function-name t))))))
 
 (defun go--function-name (&optional arg)
-  "Return the current function name as a string.
-
-If `arg' is non-nil anonymous functions will be ignored and the
-name returned will be of the top-level function.
-
-Returns nil otherwise."
+  "Return the name of the surrounding function.
+
+If ARG is non-nil, anonymous functions will be ignored and the
+name returned will be that of the top-level function. If ARG is
+nil and the surrounding function is anonymous, nil will be
+returned."
   (when (or (not (go--in-anonymous-funcion-p))
             arg)
     (save-excursion


Anonymous functions do not have docstrings, so when this is called
interactively anonymous functions will be skipped. If called programmatically,
an error is raised."
  (interactive "P")

  (when (and (not (called-interactively-p 'interactive))

If the function is a test, place point after 'Test'.
If the function is anonymous, place point on the 'func' keyword.

If ARG is non-nil, anonymous functions are skipped."
  (interactive "P")
  (when (not (looking-at "\\<func\\>"))
    (go-goto-function arg))
