energy/pkgs/assetserve/server_test.go

17 lines
295 B
Go
Raw Normal View History

package assetserve
import (
"embed"
"testing"
)
//go:embed assets
var assets embed.FS
func TestServer(t *testing.T) {
server := NewAssetsHttpServer()
server.AssetsFSName = "assets" //必须设置目录名
server.Assets = &assets
server.StartHttpServer() //go server.StartHttpServer()
}