feat(backfill): implement backfill tool for generating missing embeddings
This commit is contained in:
24
internal/app/static_assets.go
Normal file
24
internal/app/static_assets.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed static/*
|
||||
staticFiles embed.FS
|
||||
|
||||
faviconICO = mustReadStaticFile("favicon.ico")
|
||||
homeImage = mustReadStaticFile("avelonmemorycrystal.jpg")
|
||||
)
|
||||
|
||||
func mustReadStaticFile(name string) []byte {
|
||||
data, err := fs.ReadFile(staticFiles, "static/"+name)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to read embedded static file %q: %v", name, err))
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
Reference in New Issue
Block a user