diff options
author | FChannel <> | 2022-06-16 13:59:15 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | bc096c388bb0beeee09fa866a55ea1fbb41b9cb6 (patch) | |
tree | eefde542c7921e7422b3e2012c3b85b9d0e261fb /config/config.go | |
parent | aebf10de3b631f452600a5b31c1f43c1bbf8bdf2 (diff) |
config to set static modkey instead of randomly generate
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go index 11f4792..02d43eb 100644 --- a/config/config.go +++ b/config/config.go @@ -33,10 +33,12 @@ var PostCountPerPage = 10 var SupportedFiles = []string{"image/gif", "image/jpeg", "image/png", "image/webp", "image/apng", "video/mp4", "video/ogg", "video/webm", "audio/mpeg", "audio/ogg", "audio/wav", "audio/wave", "audio/x-wav"} var Log = log.New(os.Stdout, "", log.Ltime) var MediaHashs = make(map[string]string) -var Key string +var Key = GetConfigValue("modkey", "") var Themes []string var DB *sql.DB +// TODO Change this to some other config format like YAML +// to save into a struct and only read once func GetConfigValue(value string, ifnone string) string { file, err := os.Open("config/config-init") |