2 Star 1 Fork 0

liudaka / artifactory

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
base.go 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
geeeekegeeeeke 提交于 2023-12-05 11:16 . feat:
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package options
import (
"gitee.com/daka1004/artifactory/backend/app/modules/assetfs"
"gitee.com/daka1004/artifactory/backend/app/modules/setting"
)
func CustomAssets() *assetfs.Layer {
return assetfs.Local("custom", setting.CustomPath, "options")
}
func AssetFS() *assetfs.LayeredFS {
return assetfs.Layered(CustomAssets(), BuiltinAssets())
}
// Locale reads the content of a specific locale from static/bindata or custom path.
func Locale(name string) ([]byte, error) {
return AssetFS().ReadFile("locale", name)
}
// Readme reads the content of a specific readme from static/bindata or custom path.
func Readme(name string) ([]byte, error) {
return AssetFS().ReadFile("readme", name)
}
// Gitignore reads the content of a gitignore locale from static/bindata or custom path.
func Gitignore(name string) ([]byte, error) {
return AssetFS().ReadFile("gitignore", name)
}
// License reads the content of a specific license from static/bindata or custom path.
func License(name string) ([]byte, error) {
return AssetFS().ReadFile("license", name)
}
// Labels reads the content of a specific labels from static/bindata or custom path.
func Labels(name string) ([]byte, error) {
return AssetFS().ReadFile("label", name)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/daka1004/artifactory.git
git@gitee.com:daka1004/artifactory.git
daka1004
artifactory
artifactory
495e01fd4b9f

搜索帮助

344bd9b3 5694891 D2dac590 5694891