]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix double go prefix trim
authorIngo Oeser <nightlyone@googlemail.com>
Sun, 15 Apr 2018 11:46:18 +0000 (13:46 +0200)
committerMatthew Dempsky <mdempsky@google.com>
Sun, 15 Apr 2018 19:22:11 +0000 (19:22 +0000)
commitb47806d1b57bd871b30fe5980454537eaefce27c
tree5ea6681df932c19077038fe93b028d0167eec8ea
parenteef79b6712b306379f5b98259820b1a9736ecbbd
cmd/compile: fix double go prefix trim

CL 106463 introduced what seems to trim the "go:" prefix in pramas
comments twice, so "//go:go:foo" would be handled, too.
So either the strings.TrimPrefix or the [3:]-slicing is not needed.

I opted to remove the [3:]-slicing.

Change-Id: I1325bbc08a9be9ae100c5a7775b0a23f9ed0a419
Reviewed-on: https://go-review.googlesource.com/107256
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/lex.go