mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
Source files keep their SPDX-License-Identifier and Hanzo copyright line; the Gitea, Gogs and LFS Test Server copyrights they used to repeat now live once in NOTICE, alongside LICENSE. The header lint accepts any copyright line above the SPDX line, so it no longer demands an upstream one. Co-authored-by: Hanzo Dev <[email protected]>
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
// Copyright 2026 Hanzo AI, Inc. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package options
|
|
|
|
import (
|
|
"github.com/hanzoai/git/modules/assetfs"
|
|
"github.com/hanzoai/git/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)
|
|
}
|