mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-11 00:40:00 +08:00
fix(conf): Remove redundant validation (#5372)
Co-authored-by: liaogs <liaoguoshun@qq.com>
This commit is contained in:
@@ -62,11 +62,7 @@ func Load(file string, v any, opts ...Option) error {
|
|||||||
return loader([]byte(os.ExpandEnv(string(content))), v)
|
return loader([]byte(os.ExpandEnv(string(content))), v)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = loader(content, v); err != nil {
|
return loader(content, v)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return validate(v)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadConfig loads config into v from file, .json, .yaml and .yml are acceptable.
|
// LoadConfig loads config into v from file, .json, .yaml and .yml are acceptable.
|
||||||
|
|||||||
Reference in New Issue
Block a user