From 0168f55f3e2a3a6e95b0ef2d06ee1915d608c5b5 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 29 Aug 2015 18:14:24 +0100 Subject: [PATCH] Switch to spf13 fork of pflag - fixes #116 This supports --long value as well as --long=value which is as expected for a unix utility. --- drive/drive.go | 2 +- dropbox/dropbox.go | 2 +- fs/config.go | 7 ++++++- rclone.go | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drive/drive.go b/drive/drive.go index a64aca415..30430c474 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -23,7 +23,7 @@ import ( "github.com/ncw/rclone/fs" "github.com/ncw/rclone/oauthutil" - "github.com/ogier/pflag" + "github.com/spf13/pflag" ) // Constants diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 849f0f3ee..391a4aa8e 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -21,7 +21,7 @@ import ( "github.com/ncw/rclone/fs" "github.com/ncw/rclone/oauthutil" - "github.com/ogier/pflag" + "github.com/spf13/pflag" "github.com/stacktic/dropbox" ) diff --git a/fs/config.go b/fs/config.go index 02ca3d65a..5adde7c11 100644 --- a/fs/config.go +++ b/fs/config.go @@ -18,7 +18,7 @@ import ( "github.com/Unknwon/goconfig" "github.com/mreiferson/go-httpclient" - "github.com/ogier/pflag" + "github.com/spf13/pflag" ) const ( @@ -113,6 +113,11 @@ func (x *SizeSuffix) Set(s string) error { return nil } +// Type of the value +func (x *SizeSuffix) Type() string { + return "int64" +} + // Check it satisfies the interface var _ pflag.Value = (*SizeSuffix)(nil) diff --git a/rclone.go b/rclone.go index c6128a5d9..35c93050b 100644 --- a/rclone.go +++ b/rclone.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/ogier/pflag" + "github.com/spf13/pflag" "github.com/ncw/rclone/fs" // Active file systems