From 4adb4606b6a89319a36f453763abe2e6a0268e96 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 27 Dec 2022 00:54:51 +0100 Subject: [PATCH] added default language code --- config.example.yml | 1 + modules/config/config.go | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config.example.yml b/config.example.yml index b1d9524..535f014 100644 --- a/config.example.yml +++ b/config.example.yml @@ -1,4 +1,5 @@ debug: false +defaultLanguageCode: "en" rabbitmq: host: "127.0.0.1" username: "guest" diff --git a/modules/config/config.go b/modules/config/config.go index 9cba25b..24985ab 100644 --- a/modules/config/config.go +++ b/modules/config/config.go @@ -10,10 +10,11 @@ import ( var Cfg Config type Config struct { - Debug bool - RabbitMq RabbitMq - Mail Mail - Templates Templates + Debug bool + DefaultLanguageCode string `yaml:"defaultLanguageCode"` + RabbitMq RabbitMq + Mail Mail + Templates Templates } type RabbitMq struct { @@ -31,8 +32,8 @@ type Mail struct { } type Templates struct { - FolderPath string - ConfigPath string + FolderPath string `yaml:"folderPath"` + ConfigPath string `yaml:"configPath"` } func LoadConfig() {