         (setq pos (1+ pos))))
     (substring-no-properties str 0 pos)))
 
+; Uses meta as-is if annotation alignment is enabled. Otherwise removes first
+; two words from the meta, which are usually the class and the name of the
+; entity, the rest is the function signature or type. That's how annotations are
+; supposed to be used.
+(defun company-go--extract-annotation (meta)
+  "Extract annotation from META."
+  (if company-tooltip-align-annotations
+      meta
+    (save-match-data
+      (and (string-match "\\w+ \\w+\\(.+\\)" meta)
+           (match-string 1 meta)))))
+
 ;;;###autoload
 (defun company-go (command &optional arg &rest ignored)
   (case command

            (goto-char point)
            (company-go--godef-jump point)))
      (ignore-errors
         (with-current-buffer temp-buffer
           (set-buffer-modified-p nil))
        (kill-buffer temp-buffer)
        (delete-file temp)))))


    (meta (get-text-property 0 'meta arg))
    (annotation
     (when company-go-show-annotation
       (company-go--extract-annotation (get-text-property 0 'meta arg))))
    (location (company-go--location arg))
    (sorted t)
    (post-completion
