aboutsummaryrefslogtreecommitdiffstats
path: root/drive/info.go
diff options
context:
space:
mode:
Diffstat (limited to 'drive/info.go')
-rw-r--r--drive/info.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/drive/info.go b/drive/info.go
index f5f5602..ca09d0a 100644
--- a/drive/info.go
+++ b/drive/info.go
@@ -10,14 +10,18 @@ type FileInfoArgs struct {
SizeInBytes bool
}
-func (self *Drive) Info(args FileInfoArgs) {
+func (self *Drive) Info(args FileInfoArgs) (err error) {
f, err := self.service.Files.Get(args.Id).Fields("id", "name", "size", "createdTime", "modifiedTime", "md5Checksum", "mimeType", "parents", "shared", "description").Do()
- errorF(err, "Failed to get file: %s", err)
+ if err != nil {
+ return fmt.Errorf("Failed to get file: %s", err)
+ }
PrintFileInfo(PrintFileInfoArgs{
File: f,
SizeInBytes: args.SizeInBytes,
})
+
+ return
}
type PrintFileInfoArgs struct {