mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-20 17:16:39 +08:00
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