aboutsummaryrefslogtreecommitdiffstats
path: root/handlers.go
diff options
context:
space:
mode:
authorPetter Rasmussen2016-01-18 21:54:26 +0100
committerPetter Rasmussen2016-01-18 21:54:26 +0100
commit4f4152ccf32acbd392c7d80e45834ca1f3ea2d62 (patch)
treea61c9e6fcb6ede8c659ac8d76b491dbef5edafcc /handlers.go
parente60833f88408139c8a92c3de9e8bfb87f295433e (diff)
downloadgdrive-4f4152ccf32acbd392c7d80e45834ca1f3ea2d62.tar.bz2
Simplify drive wrapper, s/client/auth/
Diffstat (limited to 'handlers.go')
-rw-r--r--handlers.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/handlers.go b/handlers.go
index a36444c..f9775f7 100644
--- a/handlers.go
+++ b/handlers.go
@@ -5,7 +5,7 @@ import (
"os"
"strings"
"./cli"
- "./client"
+ "./auth"
"./drive"
)
@@ -155,17 +155,17 @@ func printCommandHelp(ctx cli.Context) {
func newDrive(args cli.Arguments) *drive.Drive {
configDir := args.String("configDir")
tokenPath := ConfigFilePath(configDir, TokenFilename)
- oauth, err := client.NewOauthClient(ClientId, ClientSecret, tokenPath, authCodePrompt)
+ oauth, err := auth.NewOauthClient(ClientId, ClientSecret, tokenPath, authCodePrompt)
if err != nil {
ExitF("Failed getting oauth client: %s", err.Error())
}
- client, err := client.NewClient(oauth)
+ client, err := drive.New(oauth)
if err != nil {
ExitF("Failed getting drive: %s", err.Error())
}
- return drive.NewDrive(client)
+ return client
}
func authCodePrompt(url string) func() string {