mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-11-04 05:27:04 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			364 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			364 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package embed
 | 
						|
 | 
						|
import (
 | 
						|
	"embed"
 | 
						|
	"io/fs"
 | 
						|
	"net/http"
 | 
						|
	"os"
 | 
						|
)
 | 
						|
 | 
						|
var (
 | 
						|
	//go:embed public
 | 
						|
	wwwPublic embed.FS
 | 
						|
	WWWPublic http.FileSystem = http.FS(os.DirFS("./public/"))
 | 
						|
)
 | 
						|
 | 
						|
//go:embed server/plugin/index.go
 | 
						|
var EmbedPluginList []byte
 | 
						|
 | 
						|
func init() {
 | 
						|
	if os.Getenv("DEBUG") != "true" {
 | 
						|
		fsPublic, _ := fs.Sub(wwwPublic, "public")
 | 
						|
		WWWPublic = http.FS(fsPublic)
 | 
						|
	}
 | 
						|
}
 |