From ab795d1030504671668a2ca96a74d195363c7108 Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Wed, 16 Oct 2024 17:43:27 -0500 Subject: Fix nil pointer dereference --- internal/service/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/service/config.go b/internal/service/config.go index 718be14..0c42755 100644 --- a/internal/service/config.go +++ b/internal/service/config.go @@ -34,8 +34,8 @@ type GlobalConfig struct { } type Config struct { - *GlobalConfig `toml:"global"` - Mirrors []*Mirror `toml:"mirrors,omitempty"` + GlobalConfig `toml:"global"` + Mirrors []*Mirror `toml:"mirrors,omitempty"` } func (c *Config) String() string { @@ -43,7 +43,7 @@ func (c *Config) String() string { } var DefaultConfig = Config{ - GlobalConfig: &GlobalConfig{ + GlobalConfig: GlobalConfig{ MaxInterval: Duration{24 * time.Hour}, MinInterval: Duration{time.Hour}, }, -- cgit v1.2.3