Parcourir la source

Small improvements for config parsing

tags/v2.0.0-rc1
9seconds il y a 5 ans
Parent
révision
c04f9e392a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      config/config.go

+ 2
- 2
config/config.go Voir le fichier

@@ -148,11 +148,11 @@ func Parse(rawData []byte) (*Config, error) {
148 148
 	}
149 149
 
150 150
 	if err := jsonEncoder.Encode(rawConf); err != nil {
151
-		return nil, fmt.Errorf("cannot dump into interim format: %w", err)
151
+		panic(err)
152 152
 	}
153 153
 
154 154
 	if err := json.NewDecoder(jsonBuf).Decode(conf); err != nil {
155
-		return nil, fmt.Errorf("cannot parse final config: %w", err)
155
+        return nil, fmt.Errorf("cannot parse a config: %w", err)
156 156
 	}
157 157
 
158 158
 	if err := conf.Validate(); err != nil {

Chargement…
Annuler
Enregistrer