From 2304f9ae29a490231b8ba38d346de0754c4a7fd4 Mon Sep 17 00:00:00 2001 From: Petter Rasmussen Date: Sat, 23 Jan 2016 22:38:45 +0100 Subject: Give about import/export own handlers --- gdrive.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'gdrive.go') diff --git a/gdrive.go b/gdrive.go index 4349b02..2980fa4 100644 --- a/gdrive.go +++ b/gdrive.go @@ -392,7 +392,7 @@ func main() { }, &cli.Handler{ Pattern: "[global options] about [options]", - Description: "Google drive metadata, quota usage, import/export formats", + Description: "Google drive metadata, quota usage", Callback: aboutHandler, Flags: cli.Flags{ "global options": globalFlags, @@ -403,21 +403,25 @@ func main() { Description: "Show size in bytes", OmitValue: true, }, - cli.BoolFlag{ - Name: "exportFormats", - Patterns: []string{"--export"}, - Description: "Show supported export formats", - OmitValue: true, - }, - cli.BoolFlag{ - Name: "importFormats", - Patterns: []string{"--import"}, - Description: "Show supported import formats", - OmitValue: true, - }, }, }, }, + &cli.Handler{ + Pattern: "[global options] about import", + Description: "Show supported import formats", + Callback: aboutImportHandler, + Flags: cli.Flags{ + "global options": globalFlags, + }, + }, + &cli.Handler{ + Pattern: "[global options] about export", + Description: "Show supported export formats", + Callback: aboutExportHandler, + Flags: cli.Flags{ + "global options": globalFlags, + }, + }, &cli.Handler{ Pattern: "version", Description: "Print application version", -- cgit v1.2.3