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

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

[nongnu] elpa/go-mode 166dfb1e09 7/7: Deprecate go-remove-unused-imports


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 166dfb1e09 7/7: Deprecate go-remove-unused-imports
Date: Wed, 28 Dec 2022 12:59:15 -0500 (EST)

branch: elpa/go-mode
commit 166dfb1e090233c4609a50c2ec9f57f113c1da72
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    Deprecate go-remove-unused-imports
    
    Most people use goimports or LSP, which provide more robust alternatives
    to parsing compiler errors. In fact, the function doesn't work for newer
    versions of Go because the format of the error has changed.
---
 README.md  | 2 --
 go-mode.el | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/README.md b/README.md
index e8f985237c..25fec17c2f 100644
--- a/README.md
+++ b/README.md
@@ -32,8 +32,6 @@ the following extra features to provide an improved 
experience:
     `C-c C-f i`)
   - 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`)
   - It is recommended that you use `goimports` or the
     `organize-imports` feature of `gopls` to manage
     adding/removing/organizing imports automatically.
diff --git a/go-mode.el b/go-mode.el
index 0a8b7c5499..c41a94aa1d 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -544,7 +544,6 @@ statements."
     ["Jump to Definition"    godef-jump t]
     "---"
     ["Add Import"            go-import-add t]
-    ["Remove Unused Imports" go-remove-unused-imports t]
     ["Go to Imports"         go-goto-imports t]
     "---"
     ("Playground"
@@ -1739,7 +1738,6 @@ The following extra functions are defined:
 - `gofmt'
 - `godoc' and `godoc-at-point'
 - `go-import-add'
-- `go-remove-unused-imports'
 - `go-goto-arguments'
 - `go-goto-docstring'
 - `go-goto-function'
@@ -2293,6 +2291,7 @@ If IGNORE-CASE is non-nil, the comparison is 
case-insensitive."
   "Remove all unused imports.
 If ARG is non-nil, unused imports will be commented, otherwise
 they will be removed completely."
+  (declare (obsolete "set `gofmt-command' to goimports instead, or use LSP and 
gopls's \"Organize Imports\" code action." "1.7.0"))
   (interactive "P")
   (save-excursion
     (let ((cur-buffer (current-buffer)) flymake-state lines)



reply via email to

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