fix: improve error messages for config file reading
This commit is contained in:
parent
8347534736
commit
faa7927376
2 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ func ReadBaseConfig(path string) (BaseConfig, error) {
|
|||
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return BaseConfig{}, fmt.Errorf("failed to read file: %w", err)
|
||||
return BaseConfig{}, fmt.Errorf("failed to read the config file: %w", err)
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(data, &config); err != nil {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ type CustomerConfig struct {
|
|||
func ReadCustomerConfig(path string) (CustomerConfig, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return CustomerConfig{}, fmt.Errorf("failed to read file: %w", err)
|
||||
return CustomerConfig{}, fmt.Errorf("failed to read customer configfile: %w", err)
|
||||
}
|
||||
|
||||
var cust CustomerConfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue