mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
add e2e tests for v1 config (#3608)
This commit is contained in:
@@ -46,10 +46,11 @@ func (c *TypedClientPluginOptions) UnmarshalJSON(b []byte) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("unknown plugin type: %s", typeStruct.Type)
|
||||
}
|
||||
if err := json.Unmarshal(b, v); err != nil {
|
||||
options := reflect.New(v).Interface().(ClientPluginOptions)
|
||||
if err := json.Unmarshal(b, options); err != nil {
|
||||
return err
|
||||
}
|
||||
c.ClientPluginOptions = v
|
||||
c.ClientPluginOptions = options
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user