* Replace pkger with go:embed for bundling the admin. Closes #844 * Remove references to pkged.go * Point tests to use an updated version of Go * Add comment to new exported function * Cleanup * Add a dummy pkged.go to alert people to stop using it. * Add simple browser test to make sure the admin is available and renders * Don't panic
This commit is contained in:
14
static/static.go
Normal file
14
static/static.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package static
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed admin/*
|
||||
//go:embed admin/_next/static
|
||||
//go:embed admin/_next/static/chunks/pages/*.js
|
||||
//go:embed admin/_next/static/*/*.js
|
||||
var adminFiles embed.FS
|
||||
|
||||
// GetAdmin will return an embedded filesystem reference to the admin web app.
|
||||
func GetAdmin() embed.FS {
|
||||
return adminFiles
|
||||
}
|
||||
Reference in New Issue
Block a user