From d8809d0a63985863b6b77365cde49b2126a71dd5 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 9 May 2023 16:32:04 +0800 Subject: [PATCH] GemConfig --- resource/config/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resource/config/config.go b/resource/config/config.go index c5b9a80..810a212 100644 --- a/resource/config/config.go +++ b/resource/config/config.go @@ -183,6 +183,10 @@ type BeanConfig struct { DIAMOND_BEAN_RATE int } +type GemConfig struct { + DIAMOND_GEM_RATE int +} + type H5Config struct { USER_LEVEL string GROUP_SUPPORT string @@ -337,6 +341,7 @@ var onlineData OnlineConfig var sessionData SessionConfig var videoData VideoConfig var beanData BeanConfig +var gemData GemConfig var h5Data H5Config var groupImData GroupImConfig var gradeData GradeConfig @@ -503,6 +508,10 @@ func GetBeanConfig() BeanConfig { return beanData } +func GetGemConfig() GemConfig { + return gemData +} + func GetH5Config() H5Config { return h5Data } @@ -692,6 +701,10 @@ func init() { mylogrus.MyLog.Fatal(err) } + if err := conf.Section("GEM").MapTo(&gemData); err != nil { + mylogrus.MyLog.Fatal(err) + } + if err := conf.Section("H5").MapTo(&h5Data); err != nil { mylogrus.MyLog.Fatal(err) } -- 2.22.0