Add proper comments.
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Set access permissions.
|
||||
var accessCmd = cli.Command{
|
||||
Name: "access",
|
||||
Usage: "Set access permissions.",
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Display contents of a file.
|
||||
var catCmd = cli.Command{
|
||||
Name: "cat",
|
||||
Usage: "Display contents of a file.",
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Copy files and folders from many sources to a single destination.
|
||||
var cpCmd = cli.Command{
|
||||
Name: "cp",
|
||||
Usage: "Copy files and folders from many sources to a single destination.",
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/mc/pkg/console"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Compute differences between two files or folders.
|
||||
var diffCmd = cli.Command{
|
||||
Name: "diff",
|
||||
Usage: "Compute differences between two files or folders.",
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// list files and folders.
|
||||
var lsCmd = cli.Command{
|
||||
Name: "ls",
|
||||
Usage: "List files and folders.",
|
||||
|
||||
@@ -100,25 +100,25 @@ func getFormattedVersion() string {
|
||||
|
||||
func registerApp() *cli.App {
|
||||
// Register all the commands
|
||||
registerCmd(lsCmd) // List contents of a bucket
|
||||
registerCmd(mbCmd) // make a bucket
|
||||
registerCmd(catCmd) // concantenate an object to standard output
|
||||
registerCmd(cpCmd) // copy objects and files from multiple sources to single destination
|
||||
registerCmd(mirrorCmd) // mirror objects and files from single source to multiple destinations
|
||||
registerCmd(sessionCmd) // session handling for resuming copy and mirror operations
|
||||
registerCmd(shareCmd) // share any given url for third party access
|
||||
registerCmd(diffCmd) // compare two objects
|
||||
registerCmd(accessCmd) // set permissions [public, private, readonly, authenticated] for buckets and folders.
|
||||
registerCmd(configCmd) // generate configuration "/home/harsha/.mc/config.json" file.
|
||||
registerCmd(updateCmd) // update Check for new software updates
|
||||
registerCmd(versionCmd) // print version
|
||||
registerCmd(lsCmd) // List contents of a bucket.
|
||||
registerCmd(mbCmd) // Make a bucket.
|
||||
registerCmd(catCmd) // Display contents of a file.
|
||||
registerCmd(cpCmd) // Copy objects and files from multiple sources to single destination.
|
||||
registerCmd(mirrorCmd) // Mirror objects and files from single source to multiple destinations.
|
||||
registerCmd(sessionCmd) // Manage sessions for copy and mirror.
|
||||
registerCmd(shareCmd) // Share documents via URL.
|
||||
registerCmd(diffCmd) // Computer differences between two files or folders.
|
||||
registerCmd(accessCmd) // Set access permissions.
|
||||
registerCmd(configCmd) // Configure minio client.
|
||||
registerCmd(updateCmd) // Check for new software updates.
|
||||
registerCmd(versionCmd) // Print version.
|
||||
|
||||
// register all the flags
|
||||
registerFlag(configFlag) // path to config folder
|
||||
registerFlag(quietFlag) // suppress console output
|
||||
registerFlag(mimicFlag) // OS toolchain mimic
|
||||
registerFlag(jsonFlag) // json formatted output
|
||||
registerFlag(debugFlag) // enable debugging output
|
||||
registerFlag(configFlag) // Path to configuration folder.
|
||||
registerFlag(quietFlag) // Suppress chatty console output.
|
||||
registerFlag(mimicFlag) // Behave like operating system tools. Use with shell aliases.
|
||||
registerFlag(jsonFlag) // Enable json formatted output.
|
||||
registerFlag(debugFlag) // Enable debugging output.
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Usage = "Minio Client for cloud storage and filesystems."
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// make a bucket or folder.
|
||||
var mbCmd = cli.Command{
|
||||
Name: "mb",
|
||||
Usage: "Make a bucket or folder.",
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Mirror folders recursively from a single source to many destinations
|
||||
var mirrorCmd = cli.Command{
|
||||
Name: "mirror",
|
||||
Usage: "Mirror folders recursively from a single source to many destinations.",
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Manage sessions for cp and mirror.
|
||||
var sessionCmd = cli.Command{
|
||||
Name: "session",
|
||||
Usage: "Manage sessions for cp and mirror.",
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Share documents via URL.
|
||||
var shareCmd = cli.Command{
|
||||
Name: "share",
|
||||
Usage: "Share documents via URL.",
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Help message.
|
||||
// Check for new software updates.
|
||||
var updateCmd = cli.Command{
|
||||
Name: "update",
|
||||
Usage: "Check for new software updates.",
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
)
|
||||
|
||||
// Print version.
|
||||
var versionCmd = cli.Command{
|
||||
Name: "version",
|
||||
Usage: "Print version.",
|
||||
|
||||
Reference in New Issue
Block a user