You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
606 B
Go
15 lines
606 B
Go
package ui
|
|
|
|
import "embed"
|
|
|
|
// The below is actually a comment directive. Comment directives must be
|
|
// placed immediately above the variable used. The path provided is relative
|
|
// to the .go file it is in. You can only embed on global variables at a package
|
|
// level. Paths cannot contain . or .. or begin with / So you are effectively
|
|
// restricted to embedding files within the same directory as the .go file.
|
|
// Lastly the embedded file system is always rooted in the directory that contains
|
|
// the embed directive. So in this example the root is in our ui dir.
|
|
|
|
//go:embed "static"
|
|
var Files embed.FS
|