]> Cypherpunks repositories - gostls13.git/commit
go/build: skip string literal while findEmbed
authorMeng Zhuo <mzh@golangcn.org>
Sat, 26 Dec 2020 02:13:57 +0000 (10:13 +0800)
committerRuss Cox <rsc@golang.org>
Fri, 8 Jan 2021 02:18:40 +0000 (02:18 +0000)
commita9ccd2d79574eead8c20d2bca4562cf2fd412787
tree89032f0ebe1779d64b86321c4860b4762e20bfb4
parentd92f8add32f79efe7e46af55172d4c703a778938
go/build: skip string literal while findEmbed

The findEmbed function looking for comment by readbyte,
however it might have constant or variables that contains
comment.
Maybe we should use ast parser in the future.

Fixes #43373

Change-Id: I92544384fc4c11363d8b2f6b9898c8dea1602767
Reviewed-on: https://go-review.googlesource.com/c/go/+/280332
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Meng Zhuo <mzh@golangcn.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/go/build/read.go
src/go/build/read_test.go