Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
okibry
· 2y ago · 0 comments
Which time golang read file, build time or run time ?
Comments
[–]
nasretdinov
2y ago
embed package allows to embed assets directly into the binary, so the files are read once during build time and then you can access them as e.g. a byte slice, a string, or a special FS object that acts like an in-memory file system
[–]
catlifeonmars
2y ago
Build time
[–]
estebarb
2y ago
Build time. It literally embeeds the file in the binary.