aboutsummaryrefslogtreecommitdiffstats
path: root/drive/share.go
diff options
context:
space:
mode:
Diffstat (limited to 'drive/share.go')
-rw-r--r--drive/share.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/drive/share.go b/drive/share.go
index 37c1bf8..43655df 100644
--- a/drive/share.go
+++ b/drive/share.go
@@ -1,11 +1,13 @@
package drive
import (
+ "io"
"fmt"
"google.golang.org/api/drive/v3"
)
type ShareArgs struct {
+ Out io.Writer
FileId string
Role string
Type string
@@ -34,7 +36,7 @@ func (self *Drive) Share(args ShareArgs) (err error) {
return fmt.Errorf("Failed share file: %s", err)
}
- fmt.Println(p)
+ fmt.Fprintln(args.Out, p)
return
}