mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
34 lines
565 B
Go
34 lines
565 B
Go
package console
|
|
|
|
import (
|
|
"net/http"
|
|
"path"
|
|
"runtime"
|
|
"testing"
|
|
)
|
|
|
|
func TestMakeHtml2GoBin(t *testing.T) {
|
|
// when you need rebuild html . please open it
|
|
_ = getAssets
|
|
/*
|
|
assets := getAssets()
|
|
|
|
err := vfsgen.Generate(assets, vfsgen.Options{
|
|
PackageName: "console",
|
|
BuildTags: "!dev",
|
|
VariableName: "Assets",
|
|
})
|
|
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}*/
|
|
}
|
|
|
|
func getAssets() http.FileSystem {
|
|
_, fileStr, _, _ := runtime.Caller(1)
|
|
split, _ := path.Split(fileStr)
|
|
|
|
var assets http.FileSystem = http.Dir(split + "html")
|
|
return assets
|
|
}
|