Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: embed: add string array and string maps #69731

Closed
ZiViZiViZ opened this issue Oct 1, 2024 · 2 comments
Closed

proposal: embed: add string array and string maps #69731

ZiViZiViZ opened this issue Oct 1, 2024 · 2 comments
Labels
Milestone

Comments

@ZiViZiViZ
Copy link

Proposal Details

I am aware of the embed.FS function, however, I feel like it will be more efficient to just use a map or array instead of a complete FS.
In addition, this will simplify the code which is one of Go's goal.

package example

import (
	"embed"
)

//go:embed file1 file2 file2 ...
var fileContentsMap map[string]string // key would be file name while value is the file's content

//go:embed file1 file2 file2 ...
var fileContentsArrays []string
@gopherbot gopherbot added this to the Proposal milestone Oct 1, 2024
@gabyhelp
Copy link

gabyhelp commented Oct 1, 2024

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@seankhliao
Copy link
Member

Duplicate of #68909

@seankhliao seankhliao marked this as a duplicate of #68909 Oct 1, 2024
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants