commit ab795d1030504671668a2ca96a74d195363c7108
parent 097f8670eb2e5c49a36dcf399e59f4057007b5b1
Author: Slack Coder <slackcoder@server.ky>
Date: Wed, 16 Oct 2024 17:43:27 -0500
Fix nil pointer dereference
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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},
},