Add default values for settings (#455)

* add default values for settings

* more default values

* more default settings and labels resource

* mv locale to options
This commit is contained in:
Lunny Xiao 2016-12-23 15:18:05 +08:00 committed by GitHub
parent ec1fe1183d
commit a822bba3e1
6 changed files with 154 additions and 24 deletions

View file

@ -76,6 +76,11 @@ func License(name string) ([]byte, error) {
return fileFromDir(path.Join("license", name))
}
// Labels eads the content of a specific labels from static or custom path.
func Labels(name string) ([]byte, error) {
return fileFromDir(path.Join("label", name))
}
// fileFromDir is a helper to read files from static or custom path.
func fileFromDir(name string) ([]byte, error) {
customPath := path.Join(setting.CustomPath, "options", name)