diff options
author | Slack Coder <slackcoder@server.ky> | 2024-10-16 17:43:27 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-10-16 17:43:27 -0500 |
commit | ab795d1030504671668a2ca96a74d195363c7108 (patch) | |
tree | 8d3532a21dd90a5315f1a166f176c31112d39766 | |
parent | 097f8670eb2e5c49a36dcf399e59f4057007b5b1 (diff) | |
download | mirror-ab795d1030504671668a2ca96a74d195363c7108.tar.xz |
Fix nil pointer dereference
-rw-r--r-- | internal/service/config.go | 6 |
1 files 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}, }, |