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 }