diff --git a/pkg/client/client.go b/pkg/client/client.go index 4cec086d..2b3a356a 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -63,37 +63,37 @@ type InvalidBucketName struct { } func (e InvalidBucketName) Error() string { - return fmt.Sprintf("Invalid bucketname %v", e.Bucket) + return "Invalid bucketname " + e.Bucket } // InvalidArgument - bad arguments provided type InvalidArgument struct{} func (e InvalidArgument) Error() string { - return fmt.Sprint("invalid arguments") + return "invalid arguments" } // InvalidMaxKeys - invalid maxkeys provided type InvalidMaxKeys struct { - Maxkeys int + MaxKeys int } func (e InvalidMaxKeys) Error() string { - return fmt.Sprintf("invalid maxkeys %v", e.Maxkeys) + return "invalid maxkeys: " + e.MaxKeys } // InvalidAuthorizationKey - invalid authorization key type InvalidAuthorizationKey struct{} func (e InvalidAuthorizationKey) Error() string { - return fmt.Sprint("invalid authorization key") + return "invalid authorization key" } // AuthorizationKeyEmpty - empty auth key provided type AuthorizationKeyEmpty struct{} func (e AuthorizationKeyEmpty) Error() string { - return fmt.Sprint("authorization key empty") + return "authorization key empty" } // InvalidRange - invalid range requested @@ -102,7 +102,7 @@ type InvalidRange struct { } func (e InvalidRange) Error() string { - return fmt.Sprintf("invalid range value %v", e.Offset) + return "invalid range value %v", e.Offset } // BucketNotFound - bucket requested does not exist @@ -111,7 +111,7 @@ type BucketNotFound struct { } func (e BucketNotFound) Error() string { - return fmt.Sprintf("bucket: %v not found", e.Bucket) + return "bucket: %v not found", e.Bucket } // ObjectNotFound - object requested does not exist @@ -121,5 +121,5 @@ type ObjectNotFound struct { } func (e ObjectNotFound) Error() string { - return fmt.Sprintf("object %v not found at bucket: %v", e.Bucket, e.Object) + return "object " + e.Object + " not found in bucket " + e.Bucket } diff --git a/pkg/client/file/.gitignore b/pkg/client/file/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/pkg/client/s3/bucket_internal.go b/pkg/client/s3/bucket_internal.go index 8812fa5b..dc5138e3 100644 --- a/pkg/client/s3/bucket_internal.go +++ b/pkg/client/s3/bucket_internal.go @@ -79,7 +79,7 @@ func (c *s3Client) queryObjects(bucket string, startAt, prefix, delimiter string var buffer bytes.Buffer if maxKeys <= 0 { - return nil, nil, iodine.New(client.InvalidMaxKeys{Maxkeys: maxKeys}, nil) + return nil, nil, iodine.New(client.InvalidMaxKeys{MasKeys: maxKeys}, nil) } marker := startAt