diff --git a/internal/config/config.go b/internal/config/config.go index bb5fead..400dc32 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,12 +29,14 @@ type ServerConfig struct { ListenAddress string `json:"listen_address"` } -func ParseFromFile(path string) (config *Config, err error) { +func ParseFromFile(path string) (*Config, error) { data, err := os.ReadFile(path) if err != nil { return nil, err } + config := &Config{} + err = json.Unmarshal(data, config) if err != nil { return nil, err