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

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

[nongnu] elpa/go-mode fdb5dfa 335/495: go.tools/oracle: change notation


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode fdb5dfa 335/495: go.tools/oracle: change notation for byte offsets to "-pos=file.go:#123-#456"
Date: Sat, 7 Aug 2021 09:05:43 -0400 (EDT)

branch: elpa/go-mode
commit fdb5dfaf1ae3d5e88dd1ea39d72abd2f407c5b27
Author: Alan Donovan <adonovan@google.com>
Commit: Dominik Honnef <dominik@honnef.co>

    go.tools/oracle: change notation for byte offsets to 
"-pos=file.go:#123-#456"
    
    The previous notation (sans '#') now yields an error but is
    "reserved for future use", e.g. to denote line/column offsets.
    Will implement as needed.
    
    R=r, crawshaw
    CC=golang-dev
    https://golang.org/cl/13526043
---
 guru_import/cmd/oracle/oracle.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guru_import/cmd/oracle/oracle.el b/guru_import/cmd/oracle/oracle.el
index c3718c4..66eed91 100644
--- a/guru_import/cmd/oracle/oracle.el
+++ b/guru_import/cmd/oracle/oracle.el
@@ -76,11 +76,11 @@ result."
       (go-oracle-set-scope))
   (let* ((filename (file-truename buffer-file-name))
          (posflag (if (use-region-p)
-                      (format "-pos=%s:%s-%s"
+                      (format "-pos=%s:#%d-#%d"
                               filename
                               (1- (go--position-bytes (region-beginning)))
                               (1- (go--position-bytes (region-end))))
-                    (format "-pos=%s:%s"
+                    (format "-pos=%s:#%d"
                             filename
                             (1- (position-bytes (point))))))
          ;; This would be simpler if we could just run 'go tool oracle'.



reply via email to

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