Hacker News new | ask | show | jobs
by okibry 627 days ago
Which time golang read file, build time or run time ?
3 comments

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
Build time
Build time. It literally embeeds the file in the binary.