energy/common/assetserve/server_test.go
杨红岩 03e3f74c7f 1. commons -> common
2. 增加内置资源http服务
2022-11-02 12:47:47 +08:00

19 lines
297 B
Go

package assetserve
import (
"embed"
"fmt"
"testing"
)
//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)
}