Golint cleanup pkg/api

This commit is contained in:
Harshavardhana
2015-03-05 21:07:19 -08:00
parent 76e601b26b
commit 540723d7ae
15 changed files with 144 additions and 135 deletions

View File

@@ -495,7 +495,7 @@ func (storage *storage) StoreObject(bucket, key, contentType string, data io.Rea
if _, err := os.Stat(objectPath); !os.IsNotExist(err) {
return mstorage.ObjectExists{
Bucket: bucket,
Key: key,
Object: key,
}
}

View File

@@ -78,12 +78,12 @@ func (storage *storage) CopyObjectToWriter(w io.Writer, bucket string, object st
// Not implemented
func (storage *storage) StoreBucketPolicy(bucket string, policy interface{}) error {
return mstorage.ApiNotImplemented{Api: "PutBucketPolicy"}
return mstorage.APINotImplemented{API: "PutBucketPolicy"}
}
// Not implemented
func (storage *storage) GetBucketPolicy(bucket string) (interface{}, error) {
return policy.BucketPolicy{}, mstorage.ApiNotImplemented{Api: "GetBucketPolicy"}
return policy.BucketPolicy{}, mstorage.APINotImplemented{API: "GetBucketPolicy"}
}
// PUT object to memory buffer
@@ -98,7 +98,7 @@ func (storage *storage) StoreObject(bucket, key, contentType string, data io.Rea
}
if _, ok := storage.objectdata[objectKey]; ok == true {
return mstorage.ObjectExists{Bucket: bucket, Key: key}
return mstorage.ObjectExists{Bucket: bucket, Object: key}
}
if contentType == "" {

View File

@@ -106,7 +106,7 @@ func (e ObjectNotFound) Error() string {
// Return string an error formatted as the given text
func (e APINotImplemented) Error() string {
return "Api not implemented: " + e.Api
return "Api not implemented: " + e.API
}
// Return string an error formatted as the given text