      (when company-go-show-annotation
        (get-text-property 0 'meta arg)))
     (location (company-go--location arg))
-    (sorted t)))
+    (sorted t)
+    (post-completion
+     (when company-go-insert-arguments
+       (company-go--insert-arguments
+        (get-text-property 0 'meta arg))))))
 
 (provide 'company-go)
 ;;; company-go.el ends here

                  (cons (current-buffer) (point))))))))
    (file-error (message "company-go: Could not run godef binary") nil)))

;;;###autoload
(defun company-go (command &optional arg &rest ignored)
  (case command

(defcustom company-go-begin-after-member-access t
  "When non-nil, automatic completion will start whenever the current
symbol is preceded by a \".\", ignoring `company-minimum-prefix-length'."
  :group 'company-go
  :type 'boolean)

(defcustom company-go-insert-arguments t
  "When non-nil, insert function or method arguments as a template after completion."
  :group 'company-go
  :type 'boolean)

