further modularize command options
This commit is contained in:
+10
-2
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user