Skip to content

proposal: embed: conditional embedding support #44484

@kesuskim

Description

@kesuskim

Really nice to see embed finally gets arrived to standard library!

Yet I believe, conditional embedding would be desirable in some use cases, seems there aren't any.

I was using packr beforehand to achieve this kind of behavior; mainly because when I want to build for container image, I do not want to embed files (mainly frontend built assets files) packed into binary because it will increase memory usage a lot.

I think it would be enough //go:embed might just ignore embedding by giving buildflags or environment variables in build time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions