mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 12:44:02 +03:00
Small improvements for config parsing
This commit is contained in:
+2
-2
@@ -148,11 +148,11 @@ func Parse(rawData []byte) (*Config, error) {
|
||||
}
|
||||
|
||||
if err := jsonEncoder.Encode(rawConf); err != nil {
|
||||
return nil, fmt.Errorf("cannot dump into interim format: %w", err)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := json.NewDecoder(jsonBuf).Decode(conf); err != nil {
|
||||
return nil, fmt.Errorf("cannot parse final config: %w", err)
|
||||
return nil, fmt.Errorf("cannot parse a config: %w", err)
|
||||
}
|
||||
|
||||
if err := conf.Validate(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user