diff options
| author | Petter Rasmussen | 2016-01-16 19:58:48 +0100 | 
|---|---|---|
| committer | Petter Rasmussen | 2016-01-16 22:09:46 +0100 | 
| commit | 53f76875dc0cc926a05dc43c5fa2a5f81b65ad36 (patch) | |
| tree | d5c8d7bbdd7ca91bae0c73c0803ca28d9a946df5 /gdrive.go | |
| parent | 50b0e69a163cd625b257d9d49dbbb880b83eeeca (diff) | |
| download | gdrive-53f76875dc0cc926a05dc43c5fa2a5f81b65ad36.tar.bz2 | |
Basic upload support
Diffstat (limited to 'gdrive.go')
| -rw-r--r-- | gdrive.go | 25 | 
1 files changed, 6 insertions, 19 deletions
| @@ -13,7 +13,6 @@ const ClientId     = "367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleu  const ClientSecret = "1qsNodXNaWq1mQuBjUjmvhoO"  const DefaultMaxFiles = 100 -const DefaultChunkSize = 4194304  var DefaultConfigDir = GetDefaultConfigDir()  var DefaultTokenFilePath = GetDefaultTokenFilePath() @@ -50,7 +49,7 @@ func main() {                      },                      cli.BoolFlag{                          Name: "skipHeader", -                        Patterns: []string{"--noheader"}, +                        Patterns: []string{"--no-header"},                          Description: "Dont print the header",                          OmitValue: true,                      }, @@ -78,7 +77,7 @@ func main() {                      },                      cli.BoolFlag{                          Name: "noProgress", -                        Patterns: []string{"--noprogress"}, +                        Patterns: []string{"--no-progress"},                          Description: "Hide progress",                          OmitValue: true,                      }, @@ -94,7 +93,7 @@ func main() {          &cli.Handler{              Pattern: "[global options] upload [options] <path>",              Description: "Upload file or directory", -            Callback: handler, +            Callback: uploadHandler,              Flags: cli.Flags{                  "global options": globalFlags,                  "options": []cli.Flag{ @@ -115,9 +114,9 @@ func main() {                          Description: "Filename",                      },                      cli.BoolFlag{ -                        Name: "progress", -                        Patterns: []string{"--progress"}, -                        Description: "Show progress", +                        Name: "noProgress", +                        Patterns: []string{"--no-progress"}, +                        Description: "Hide progress",                          OmitValue: true,                      },                      cli.BoolFlag{ @@ -137,18 +136,6 @@ func main() {                          Description: "Share file",                          OmitValue: true,                      }, -                    cli.BoolFlag{ -                        Name: "share", -                        Patterns: []string{"--convert"}, -                        Description: "Convert file to google docs format", -                        OmitValue: true, -                    }, -                    cli.IntFlag{ -                        Name: "chunksize", -                        Patterns: []string{"--chunksize"}, -                        Description: fmt.Sprintf("Set chunk size in bytes. Minimum is 262144, default is %d", DefaultChunkSize), -                        DefaultValue: DefaultChunkSize, -                    },                  },              },          }, | 
