cmd/go: -overlay doesn't apply to embed directives #59406
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I use
go:embed
to embed a single file as string. The program prints file content and exits. I have an entry inoverlay.json
with the path of the file being embedded as a key pointing to another file. I passoverlay.json
togo build
via-overlay
option. Then I invoke the resulting binary.What did you expect to see?
The content from the replacement file as specified via
overlay.json
.What did you see instead?
The content from the original file.
The reproducer is available at https://github.com/mejedi/golang-overlay-experiment
The text was updated successfully, but these errors were encountered: