One of Go’s biggest advantages is that it compiles to a single executable file.
In Go 1.16 we got a new package called embed, which allows you to embed assets inside the generated executable. Let’s see how to embed a static directory and .sql file.
View the code used in this video: https://github.com/353words/building-go
For more on the embed package: https://pkg.go.dev/embed
----
Access our online courses → https://www.ardanlabs.com/education
Attend a live training → https://www.ardanlabs.com/live-traini...
Other Links:
Website: https://www.ardanlabs.com/
Github: https://github.com/ardanlabs
Twitter: / ardanlabs
Смотрите видео Building Go Executables: Embedding Assets онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ardan Labs 11 Август 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 6,123 раз и оно понравилось 152 людям.