package
module
Version:
v0.0.0-...-364ae85
Opens a new window with list of versions in this module.
Published: Nov 2, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
assetserve
Golang静态资源服务
//内置到执行程序的资源目录
//go:embed assets
var assets embed.FS
func TestServer(t *testing.T) {
server := NewAssetsHttpServer()
server.AssetsFSName = "assets" //必须设置目录名
server.Assets = &assets
err := server.StartHttpServer()
fmt.Println(err)
}
http://localhost/xxx.png
Documentation
¶
func NewAssetsHttpServer() *assetsHttpServer
证书配置,根据 Assets 或 LocalAssets 寻找证书文件位置
Source Files
¶
Click to show internal directories.
Click to hide internal directories.