refactor: optimize driver initialization need to manually deserialize and assign values, and remove redundant driver registration parameters (#2691)
* refactor: optimize driver initialization need to manually deserialize and assign values, and remove redundant driver registration parameters * fix typo Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
@ -21,10 +21,8 @@ var config = driver.Config{
|
||||
CheckStatus: true,
|
||||
}
|
||||
|
||||
func New() driver.Driver {
|
||||
return &SFTP{}
|
||||
}
|
||||
|
||||
func init() {
|
||||
op.RegisterDriver(config, New)
|
||||
op.RegisterDriver(func() driver.Driver {
|
||||
return &SFTP{}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user