From ff92fd6571abcb093b06bc979f150fe6ef64c22c Mon Sep 17 00:00:00 2001 From: ayntgl Date: Tue, 25 Jan 2022 14:22:31 +0400 Subject: [PATCH] feat: use toml for configuration --- config/mod.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/mod.go b/config/mod.go index 13bd65a..9cada12 100644 --- a/config/mod.go +++ b/config/mod.go @@ -7,11 +7,11 @@ import ( ) type GeneralConfig struct { - UserAgent string `json:"userAgent"` - FetchMessagesLimit int `json:"fetchMessagesLimit"` - Mouse bool `json:"mouse"` - Notifications bool `json:"notifications"` - Timestamps bool `json:"timestamps"` + UserAgent string `toml:"user_agent"` + FetchMessagesLimit int `toml:"fetch_messages_limit"` + Mouse bool `toml:"mouse"` + Notifications bool `toml:"notifications"` + Timestamps bool `toml:"timestamps"` } type KeybindingsConfig struct { @@ -29,8 +29,8 @@ type KeybindingsConfig struct { } type Config struct { - Keybindings KeybindingsConfig `json:"keybindings"` - General GeneralConfig `json:"general"` + General GeneralConfig `toml:"general"` + Keybindings KeybindingsConfig `toml:"keybindings"` } func Load() Config {