emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 22427ec 028/495: update documentation


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 22427ec 028/495: update documentation
Date: Sat, 7 Aug 2021 09:04:37 -0400 (EDT)

branch: elpa/go-mode
commit 22427ec63dcc6d954f2dcbec27bc97f0841d0180
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    update documentation
---
 README.md  | 1 +
 go-mode.el | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 451ab68..1e98677 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,7 @@ Features
 - Support for `C-M-h` (`mark-defun`)
 - Two functions for sending code to the Playground (`go-play-buffer` and 
`go-play-region`)
 - A function for adding imports, including tab completion (`go-import-add`, 
bound to `C-c C-a`)
+- A function for removing or commenting unused imports 
(`go-remove-unused-imports`)
 - A function for jumping to the file's imports (`go-goto-imports`)
 - Adds basic support for imenu (functions and variables)
 
diff --git a/go-mode.el b/go-mode.el
index ad5f273..42846ec 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -634,7 +634,6 @@ uncommented, otherwise a new import will be added."
     (if (string-match "_test\.go$" buffer-file-truename)
         (setq cmd "go test -c")
       (setq cmd "go build -o /dev/null"))
-    ;; TODO handle *_test.go files
     (reverse (remove nil
                      (mapcar
                       (lambda (line)
@@ -644,6 +643,8 @@ uncommented, otherwise a new import will be added."
                       (split-string (shell-command-to-string cmd) "\n"))))))
 
 (defun go-remove-unused-imports (arg)
+  "Removes all unused imports. If ARG is non-nil, unused imports
+will be commented, otherwise they will be removed completely."
   (interactive "P")
   (save-excursion
     (let ((cur-buffer (current-buffer)) lines)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]