Go Time: Golang, Software Engineering cover image

go:embed

Go Time: Golang, Software Engineering

00:00

Go Embed Assets - You Can Use Multiple Lines

You can use multiple go embed directives above the variable declaration. So that's actually a really good way to do it. If you have var static or var FS and then you say in the go embed comment above it, go embed assets slash CSS slash star dot CSS space assets slash JS slash star dot JS and then images and so on. It will embed almost everything in the assets recursively. The things that it doesn't embed are dot files. Go won't compile files that begin with underscore.

Play episode from 24:53
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app