Vasiliy Tolstov c27cf5982d partially rewrite for own needs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-08 22:22:43 +03:00

21 lines
327 B
Go

// +build dev
package assets
import (
"go/build"
"log"
"net/http"
)
func importPathToDir(importPath string) string {
p, err := build.Import(importPath, "", build.FindOnly)
if err != nil {
log.Fatal(err)
}
return p.Dir
}
// Assets contains the project's assets.
var Assets http.FileSystem = http.Dir("./templates")