Example of using embed in go

Nice article on using go templates with embed introduced in go1.16: https://philipptanlak.com/web-frontends-in-go/.

That’s the code:

Project structure:

main.go:

…/html.go:

Similar Posts

LEAVE A COMMENT