aboutsummaryrefslogtreecommitdiffsponsor
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-10-16 17:43:27 -0500
committerSlack Coder <slackcoder@server.ky>2024-10-16 17:43:27 -0500
commitab795d1030504671668a2ca96a74d195363c7108 (patch)
tree8d3532a21dd90a5315f1a166f176c31112d39766
parent097f8670eb2e5c49a36dcf399e59f4057007b5b1 (diff)
downloadmirror-ab795d1030504671668a2ca96a74d195363c7108.tar.xz
Fix nil pointer dereference
-rw-r--r--internal/service/config.go6
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},
},