mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
config: add some validations (#3610)
This commit is contained in:
@@ -99,7 +99,7 @@ func (c *TypedVisitorConfig) UnmarshalJSON(b []byte) error {
|
||||
c.Type = typeStruct.Type
|
||||
configurer := NewVisitorConfigurerByType(typeStruct.Type)
|
||||
if configurer == nil {
|
||||
return fmt.Errorf("unknown visitor type: %s" + typeStruct.Type)
|
||||
return fmt.Errorf("unknown visitor type: %s", typeStruct.Type)
|
||||
}
|
||||
if err := json.Unmarshal(b, configurer); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user