-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed.go
More file actions
18 lines (15 loc) · 812 Bytes
/
Copy pathembed.go
File metadata and controls
18 lines (15 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main
// This file exists solely to hold the //go:embed directive for the assets directory.
//
// Go's embed package requires that embed paths be relative to the file containing
// the directive, with no ".." path components allowed. Since the assets/ directory
// sits at the module root, the embed directive must live in a file at the root level.
// The embedded FS is passed into the web package via web.NewServer() rather than
// being accessed directly from internal/web/, which would require an illegal "../" path.
import "embed"
// embeddedAssets contains all dashboard templates and static assets (Alpine.js,
// Tailwind CSS) baked into the binary at compile time. The "all:" prefix ensures
// files beginning with "." or "_" are also included.
//
//go:embed assets
var embeddedAssets embed.FS