Building Go Executables: Code Generation

preview_player
Показать описание
In this example, @MikiTebeka wants to build a web server that serves random quotes. This could be done one of two ways:
- Embed a text file in the executable and parse it every time
- Do it once and generate a go file that generates a slice with all of the quotes

By utilizing go generate, we can detect errors at build time, which is better for our development workflow.

----

Other Links:
Рекомендации по теме
Комментарии
Автор

Great video. Could you provide the code as you never see the whole code of the gen_quotes. That would be very helpful.

gowizzardde