Reorder options, print only error messages

This commit is contained in:
Harshavardhana
2015-05-21 18:08:12 -07:00
parent 0f4f59c1a0
commit aeaf8d4055
2 changed files with 18 additions and 20 deletions
+15 -17
View File
@@ -316,24 +316,22 @@ EXAMPLES:
// Collection of mc commands currently supported are
//
// ----
// ls List files and objects
// cp Copy objects and files from multiple sources to single destination
// sync Copy objects and files from single source to multiple destionations
// mb Make a bucket
// access Set permissions [public, private, readonly, authenticated] for buckets and folders.
// cat Concantenate an object to standard output
// config Generate configuration "/home/harsha/.mc/config.json" file.
// update Check for new software updates
// ----
// ls List files and objects
// cp Copy objects and files from multiple sources to single destination
// sync Copy objects and files from single source to multiple destionations
// mb Make a bucket
// access Set permissions [public, private, readonly, authenticated] for buckets and folders.
// cat Concantenate an object to standard output
// config Generate configuration "/home/harsha/.mc/config.json" file.
// update Check for new software updates
//
var commands = []cli.Command{
lsCmd,
mbCmd,
catCmd,
cpCmd,
syncCmd,
diffCmd,
catCmd,
mbCmd,
accessCmd,
configCmd,
updateCmd,
@@ -342,11 +340,11 @@ var commands = []cli.Command{
// Collection of mc flags currently supported
//
// --theme "minimal"Choose a console theme from this list [*minimal*, nocolor, white]
// --debug Enable HTTP tracing
// --quiet, -q Supress chatty console output
// --retry "5" Number of retry count
// --version, -v print the version
// --theme "minimal"Choose a console theme from this list [*minimal*, nocolor, white]
// --debug Enable HTTP tracing
// --quiet, -q Supress chatty console output
// --retry "5" Number of retry count
// --version, -v print the version
//
var (
flags = []cli.Flag{
+3 -3
View File
@@ -55,11 +55,11 @@ var (
Printf = themesDB[currThemeName].Info.Printf
// Fatal prints a error message and exits
Fatal = func(a ...interface{}) { print(themesDB[currThemeName].Fatal, a...); os.Exit(1) }
Fatal = func(a ...interface{}) { print(themesDB[currThemeName].Error, a...); os.Exit(1) }
// Fatalln prints a error message with a new line and exits
Fatalln = func(a ...interface{}) { println(themesDB[currThemeName].Fatal, a...); os.Exit(1) }
Fatalln = func(a ...interface{}) { println(themesDB[currThemeName].Error, a...); os.Exit(1) }
// Fatalf prints a error message with formatting and exits
Fatalf = func(f string, a ...interface{}) { printf(themesDB[currThemeName].Fatal, f, a...); os.Exit(1) }
Fatalf = func(f string, a ...interface{}) { printf(themesDB[currThemeName].Error, f, a...); os.Exit(1) }
// Error prints a error message
Error = func(a ...interface{}) { print(themesDB[currThemeName].Error, a...) }