mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 21:57:59 +02:00
oauthutil: tidy interface to Config to add Options struct
The interface was getting so that a new function was needed for every Config variant. Adding an Options struct fixes this.
This commit is contained in:
@ -152,7 +152,10 @@ func init() {
|
||||
oauthConfig.Endpoint.TokenURL = endpoint + tokenPath
|
||||
return nil
|
||||
}
|
||||
err := oauthutil.ConfigWithCallback("sharefile", name, m, oauthConfig, checkAuth)
|
||||
opt := oauthutil.Options{
|
||||
CheckAuth: checkAuth,
|
||||
}
|
||||
err := oauthutil.Config("sharefile", name, m, oauthConfig, &opt)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to configure token: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user