Commit Graph

2 Commits (c1672cdc0d1e3956b42a8558eb9110a2e380bdbb)

Author SHA1 Message Date
Daniel Martí e2ddce75a7 support embedding via embed.FS
We already added support for "//go:embed" with string and []byte,
by not obfuscating the "embed" import path.

However, embed.FS was still failing:

	> garble build
	[stderr]
	# test/main
	:13: go:embed cannot apply to var of type embed.WtKNvwbN

The compiler detects the type by matching its name to exactly "embed.FS",
so don't obfuscate the name "FS" either.

While at it, ensure that the embed code behaves the same with "go build".

Updates #349.
4 years ago
lu4p 810bdf448e don't obfuscate the "embed" import path
Updates #263
5 years ago