mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 00:40:26 +08:00
feat: 使用embed将静态资源打包进二进制文件&其他小功能优化
This commit is contained in:
9
server/static/static.go
Normal file
9
server/static/static.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package static
|
||||
|
||||
import "embed"
|
||||
|
||||
// 使用1.16特性编译阶段将静态资源文件打包进编译好的程序
|
||||
var (
|
||||
//go:embed static/**
|
||||
Static embed.FS
|
||||
)
|
||||
Reference in New Issue
Block a user