feat: Implement initial full-stack application structure including frontend pages, components, hooks, API integration, and backend services for account pooling and management.
This commit is contained in:
27
backend/internal/web/embed.go
Normal file
27
backend/internal/web/embed.go
Normal file
@@ -0,0 +1,27 @@
|
||||
//go:build embed
|
||||
// +build embed
|
||||
|
||||
package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//go:embed dist/*
|
||||
var distFS embed.FS
|
||||
|
||||
// GetFileSystem 返回嵌入的前端文件系统
|
||||
func GetFileSystem() http.FileSystem {
|
||||
sub, err := fs.Sub(distFS, "dist")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return http.FS(sub)
|
||||
}
|
||||
|
||||
// IsEmbedded 返回前端是否已嵌入
|
||||
func IsEmbedded() bool {
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user