diff --git a/cmd-options.go b/cmd-options.go index 70e1027e..0fe64320 100644 --- a/cmd-options.go +++ b/cmd-options.go @@ -25,8 +25,10 @@ import ( ) // Collection of mc commands currently supported are -var commands = []cli.Command{ - lsCmd, // list files and objects +var commands = []cli.Command{} + +/* +{ mbCmd, // make a bucket catCmd, // concantenate an object to standard output cpCmd, // copy objects and files from multiple sources to single destination @@ -37,6 +39,7 @@ var commands = []cli.Command{ updateCmd, // update Check for new software updates // Add your new commands starting from here } +*/ // Collection of mc flags currently supported var ( @@ -74,3 +77,8 @@ var ( // Add your new flags starting here } ) + +// registerCommand registers a cli command +func registerCommand(cmd cli.Command) { + commands = append(commands, cmd) +} diff --git a/main.go b/main.go index 50ef1f2e..473e1073 100644 --- a/main.go +++ b/main.go @@ -98,6 +98,16 @@ func getSystemData() map[string]string { var Version = mustHashBinarySelf() func main() { + registerCommand(lsCmd) // List contents of a bucket + registerCommand(mbCmd) // make a bucket + registerCommand(catCmd) // concantenate an object to standard output + registerCommand(cpCmd) // copy objects and files from multiple sources to single destination + registerCommand(syncCmd) // copy objects and files from single source to multiple destionations + registerCommand(diffCmd) // compare two objects + registerCommand(accessCmd) // set permissions [public, private, readonly, authenticated] for buckets and folders. + registerCommand(configCmd) // generate configuration "/home/harsha/.mc/config.json" file. + registerCommand(updateCmd) // update Check for new software updates + app := cli.NewApp() app.Usage = "Minio Client for object storage and filesystems" app.Version = Version