cmd/guru: fix typo of 'hyphen' to rename to 'comma'
start|end byte offset separator is not hyphen(-), actually comma(,)
Change-Id: I344ae74d33863e9456e8cdb2f058fd70f1eedf95
Reviewed-on: https://go-review.googlesource.com/35770
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/cmd/guru/pos.go b/cmd/guru/pos.go
index 591aad8..2e659fe42 100644
--- a/cmd/guru/pos.go
+++ b/cmd/guru/pos.go
@@ -52,14 +52,14 @@
filename, offset := pos[:colon], pos[colon+1:]
startOffset = -1
endOffset = -1
- if hyphen := strings.Index(offset, ","); hyphen < 0 {
+ if comma := strings.Index(offset, ","); comma < 0 {
// e.g. "foo.go:#123"
startOffset = parseOctothorpDecimal(offset)
endOffset = startOffset
} else {
// e.g. "foo.go:#123,#456"
- startOffset = parseOctothorpDecimal(offset[:hyphen])
- endOffset = parseOctothorpDecimal(offset[hyphen+1:])
+ startOffset = parseOctothorpDecimal(offset[:comma])
+ endOffset = parseOctothorpDecimal(offset[comma+1:])
}
if startOffset < 0 || endOffset < 0 {
err = fmt.Errorf("invalid offset %q in query position", offset)