diff --git a/config.go b/config.go index ac7ee78..2992bfa 100644 --- a/config.go +++ b/config.go @@ -22,15 +22,13 @@ type ServerStoreConfig struct { func ServerConfigFromReader(r io.Reader) (*ServerConfig, error) { decoder := toml.NewDecoder(r) - var c ServerConfig + c := ServerConfig{ + Store: &ServerStoreConfig{}, + } if err := decoder.Decode(&c); err != nil { return nil, fmt.Errorf("error decoding server config: %w", err) } - if c.Store == nil { - c.Store = &ServerStoreConfig{} - } - c.updateFromEnv() return &c, nil