chore: fmt modify
This commit is contained in:
@@ -99,12 +99,12 @@ func (c *JSONConfigContainer) sub(key string) (map[string]interface{}, error) {
|
||||
}
|
||||
value, ok := c.data[key]
|
||||
if !ok {
|
||||
return nil, errors.New(fmt.Sprintf("key is not found: %s", key))
|
||||
return nil, fmt.Errorf("key is not found: %s", key)
|
||||
}
|
||||
|
||||
res, ok := value.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New(fmt.Sprintf("the type of value is invalid, key: %s", key))
|
||||
return nil, fmt.Errorf("the type of value is invalid, key: %s", key)
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user