gitech
1// Copyright 2022 The Gitea Authors. All rights reserved.
2// SPDX-License-Identifier: MIT
3
4package options5
6import (7"code.gitea.io/gitea/modules/assetfs"8"code.gitea.io/gitea/modules/setting"9)
10
11func CustomAssets() *assetfs.Layer {12return assetfs.Local("custom", setting.CustomPath, "options")13}
14
15func AssetFS() *assetfs.LayeredFS {16return assetfs.Layered(CustomAssets(), BuiltinAssets())17}
18
19// Locale reads the content of a specific locale from static/bindata or custom path.
20func Locale(name string) ([]byte, error) {21return AssetFS().ReadFile("locale", name)22}
23
24// Readme reads the content of a specific readme from static/bindata or custom path.
25func Readme(name string) ([]byte, error) {26return AssetFS().ReadFile("readme", name)27}
28
29// Gitignore reads the content of a gitignore locale from static/bindata or custom path.
30func Gitignore(name string) ([]byte, error) {31return AssetFS().ReadFile("gitignore", name)32}
33
34// License reads the content of a specific license from static/bindata or custom path.
35func License(name string) ([]byte, error) {36return AssetFS().ReadFile("license", name)37}
38
39// Labels reads the content of a specific labels from static/bindata or custom path.
40func Labels(name string) ([]byte, error) {41return AssetFS().ReadFile("label", name)42}
43