[tools] gopls/internal/licenses: use //go:embed rather than a hand-embedded string

0 views
Skip to first unread message

Damien Neil (Gerrit)

unread,
Jun 30, 2026, 6:23:29 PM (6 hours ago) Jun 30
to goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com
Attention needed from Alan Donovan

Damien Neil voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I6295a98ba4a037b3ea05e58599befc116a6a6964
Gerrit-Change-Number: 795880
Gerrit-PatchSet: 1
Gerrit-Owner: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Attention: Alan Donovan <adon...@google.com>
Gerrit-Comment-Date: Tue, 30 Jun 2026 22:23:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
Jun 30, 2026, 6:27:31 PM (6 hours ago) Jun 30
to Damien Neil, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
Attention needed from Damien Neil

Alan Donovan voted and added 2 comments

Votes added by Alan Donovan

Auto-Submit+1
Code-Review+2
Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Alan Donovan . resolved

Thanks!

File gopls/internal/licenses/gen-licenses.sh
Line 21, Patchset 1 (Parent):const Text = \`
END
Alan Donovan . resolved

Yeah, even before //go:embed, this should have been a small Go program that used strconv.Quote.

Open in Gerrit

Related details

Attention is currently required from:
  • Damien Neil
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I6295a98ba4a037b3ea05e58599befc116a6a6964
Gerrit-Change-Number: 795880
Gerrit-PatchSet: 1
Gerrit-Owner: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Attention: Damien Neil <dn...@google.com>
Gerrit-Comment-Date: Tue, 30 Jun 2026 22:27:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Jun 30, 2026, 6:48:03 PM (5 hours ago) Jun 30
to Damien Neil, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
gopls/internal/licenses: use //go:embed rather than a hand-embedded string

Avoid surprising errors (and a not-very-useful code injection mechanism)
when processing a license containing a back-quote.
Change-Id: I6295a98ba4a037b3ea05e58599befc116a6a6964
Auto-Submit: Alan Donovan <adon...@google.com>
Reviewed-by: Alan Donovan <adon...@google.com>
Files:
  • M gopls/internal/licenses/gen-licenses.sh
  • M gopls/internal/licenses/licenses.go
  • A gopls/internal/licenses/licenses.txt
  • M gopls/internal/licenses/licenses_test.go
Change size: XL
Delta: 4 files changed, 572 insertions(+), 583 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I6295a98ba4a037b3ea05e58599befc116a6a6964
Gerrit-Change-Number: 795880
Gerrit-PatchSet: 2
Gerrit-Owner: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages