You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use embed.FS where some files in the file system are executable:
var (
//go:embed mustache
mustacheTemplateFS embed.FS
)
Create an embedded file system with executable files. Stat the executable file in the embedded file system. Observe that the file's mode has all execute bits off.
What did you expect to see?
The file's mode to have the execute bit(s) on.
What did you see instead?
The file's mode to have the execute bits off.
The text was updated successfully, but these errors were encountered:
Go source files that import "embed" can use the //go:embed directive to initialize a variable of type string, []byte, or FS with the contents of files read from the package directory or subdirectories at compile time.
embed is for file contents, not replicating an entire filesystem.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Don't know
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use
embed.FS
where some files in the file system are executable:Create an embedded file system with executable files. Stat the executable file in the embedded file system. Observe that the file's mode has all execute bits off.
What did you expect to see?
The file's mode to have the execute bit(s) on.
What did you see instead?
The file's mode to have the execute bits off.
The text was updated successfully, but these errors were encountered: