This commit is contained in:
李子铭 2024-12-10 14:12:32 +08:00
parent d28961f0ba
commit 2a4c5b9373
1 changed files with 1 additions and 2 deletions

View File

@ -26,8 +26,7 @@ type Config struct {
func transConfig(config []byte) (*Config, error) {
var c Config
err := json.Unmarshal(config, &c)
if err != nil {
if err := json.Unmarshal(config, &c); err != nil {
return nil, proto.ErrorConfigFail(fmt.Sprintf("配置参数有误:%s", err.Error()))
}
return &c, nil