clear cache

This commit is contained in:
微凉
2021-11-01 22:42:24 +08:00
parent 6313939e8c
commit 5c2ce5b442
6 changed files with 49 additions and 11 deletions

View File

@ -148,11 +148,23 @@ func initSettings() {
Group: model.PUBLIC,
},
{
Key: "text types",
Value: "txt,htm,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,yml,go,sh,c,cpp,h,hpp",
Type: "string",
Key: "text types",
Value: "txt,htm,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,yml,go,sh,c,cpp,h,hpp",
Type: "string",
Description: "text type extensions",
},
{
Key: "readme file",
Value: "hide",
Type: "string",
Description: "hide readme file? (show/hide)",
},
{
Key: "music cover",
Value: "https://store.heytapimage.com/cdo-portal/feedback/202110/30/d43c41c5d257c9bc36366e310374fb19.png",
Type: "string",
Description: "music cover image",
},
},
}
for k, v := range settingsMap {
@ -165,7 +177,7 @@ func initSettings() {
}
}
textTypes, err := model.GetSettingByKey("text types")
if err==nil{
conf.TextTypes = strings.Split(textTypes.Value,",")
if err == nil {
conf.TextTypes = strings.Split(textTypes.Value, ",")
}
}