                           ;; accepting a full path, and some features
                           ;; of goimports rely on knowing the full
                           ;; name.
-                          (list "-srcdir" (go--file-local-name
+                          (list "-srcdir" (file-local-name
                                            (file-truename buffer-file-name))))))
           (setq our-gofmt-args
                 (append our-gofmt-args gofmt-args
-                        (list "-w" (go--file-local-name tmpfile))))
+                        (list "-w" (file-local-name tmpfile))))
           (message "Calling gofmt: %s %s" gofmt-command our-gofmt-args)
           ;; We're using errbuf for the mixed stdout and stderr output. This
           ;; is not an issue because gofmt -w does not produce any stdout

                 (concat (file-name-directory filename) (file-name-nondirectory tmpfile))
               tmpfile)))
        (while (search-forward-regexp
                (concat "^\\(" (regexp-quote (go--file-local-name truefile))
                        "\\):")
                nil t)
          (replace-match (file-name-nondirectory filename) t t nil 1)))

;;;###autoload
(add-to-list 'auto-mode-alist '("go\\.mod\\'" . go-dot-mod-mode))

;; The following functions were copied (and modified) from rust-mode.el.
;;
;; Copyright (c) 2015 The Rust Project Developers
