From 84312aa521a751f09abebc5bd240a1719f2d1dcf Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Thu, 15 Jan 2015 10:13:01 -0500 Subject: [PATCH] refactor/rename: clarify usage message In the example, we use backslashes (not single quotes) to escape double-quotes since it works on both Windows and POSIX. Change-Id: Id883f5457bec4d8a36d5b12c759ad385125a98a6 Reviewed-on: https://go-review.googlesource.com/2862 Reviewed-by: Robert Griesemer --- refactor/rename/rename.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/refactor/rename/rename.go b/refactor/rename/rename.go index fde32875a0..6543685457 100644 --- a/refactor/rename/rename.go +++ b/refactor/rename/rename.go @@ -55,13 +55,12 @@ Flags: "encoding/json"::x object x anywhere within a package json.go::x object x within file json.go + Double-quotes must be escaped when writing a shell command. + Quotes may be omitted for single-segment import paths such as "fmt". + For methods, the parens and '*' on the receiver type are both optional. - Double-quotes may be omitted for single-segment import paths - such as fmt. They may need to be escaped when writing a - shell command. - It is an error if one of the ::x queries matches multiple objects. @@ -99,7 +98,7 @@ Examples: Rename the object whose identifier is at byte offset 123 within file file.go. -% gorename -from '"bytes".Buffer.Len' -to Size +% gorename -from \"bytes\".Buffer.Len' -to Size Rename the "Len" method of the *bytes.Buffer type to "Size".