We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e0aef commit 20484faCopy full SHA for 20484fa
modules/templates/dynamic.go
@@ -27,6 +27,7 @@ var (
27
bodyTemplates = template.New("")
28
)
29
30
+// GetAsset returns asset content via name
31
func GetAsset(name string) ([]byte, error) {
32
bs, err := ioutil.ReadFile(filepath.Join(setting.CustomPath, name))
33
if err != nil && !os.IsNotExist(err) {
@@ -38,6 +39,7 @@ func GetAsset(name string) ([]byte, error) {
38
39
return ioutil.ReadFile(filepath.Join(setting.StaticRootPath, name))
40
}
41
42
+// GetAssetNames returns assets list
43
func GetAssetNames() []string {
44
tmpls := getDirAssetNames(filepath.Join(setting.CustomPath, "templates"))
45
tmpls2 := getDirAssetNames(filepath.Join(setting.StaticRootPath, "templates"))
0 commit comments