-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Description
Problem: if you embed a directory, it may embed unwanted files from the directory.
Proposal: Comments with //go:embed-exclude
apply a filter of files to exclude from the embed.
Example:
Given a directory with static/a.txt
and static/.dot
:
//go:embed static
//go:embed-exclude .*
var staticFiles embed.FS
will just embed static/a.txt
.
Refs. #42321.
Merovius, tmthrgd, mpx, bcmills and seankhliao
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.