stat: Print proper error messages when bucket name is empty.

Handle cases for situations for all commands where target bucket
name is not specified, indicate proper errors in this situation.

Fixes #1629
This commit is contained in:
Harshavardhana
2016-03-30 18:46:20 -07:00
parent aeb6de996c
commit 1e1516c968
4 changed files with 56 additions and 54 deletions
+9
View File
@@ -56,6 +56,15 @@ func (e BucketNameEmpty) Error() string {
return "Bucket name cannot be empty."
}
// BucketInvalid - bucket name invalid.
type BucketInvalid struct {
Bucket string
}
func (e BucketInvalid) Error() string {
return "Bucket name " + e.Bucket + " not valid."
}
// ObjectAlreadyExists - typed return for MethodNotAllowed
type ObjectAlreadyExists struct {
Object string