DEV Community

Discussion on: Seamlessly Embed Files Into Your Go Binary

Collapse
 
siwalikm profile image
Siwalik Mukherjee

Nice read Prakash, can go:embed be used to embed dynamic content generated during runtime?

Collapse
 
prakash_chokalingam profile image
prakash chokalingam

I don't think so @siwalikm, We can't write files within the embed fs dynamically, It can be used only to read. You can utilize the actual file system (pkg.go.dev/os) to read and write files dynamically.