3 ms·
File embedding is a common enough use case (HTML templates, config files) that it really makes me cringe that it's being done with comments.
by skrtskrt 6y ago
File embedding is a common enough use case (HTML templates, config files) that it really makes me cringe that it's being done with comments.
- grey-area 6y agoI just keep my templates and config in separate files. There are good reasons to keep them separate anyway (allows config without recompile for example) and for the apps I work on distribution isn’t a problem. So I haven’t really had to use comments as code in 7-8 years of go. Perhaps it’ll become more common with the embed stuff. But then I don’t use struct tags either so I guess I’d prefer Go to be even simpler.