Skip to content

Commit

Permalink
More golint
Browse files Browse the repository at this point in the history
  • Loading branch information
jutkko committed Mar 5, 2017
1 parent 9f2f3a3 commit 0cfe483
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ import (

//go:generate counterfeiter . MinioClient

// MinioClient is the s3 client
type MinioClient interface {
MakeBucket(string, string) error
BucketExists(string) (bool, error)
PutObject(string, string, io.Reader, string) (int64, error)
FGetObject(string, string, string) error
}

// S3Write is the function that writes to s3
func S3Write(client MinioClient, bucketName, objectName, location string, content io.Reader) error {
exists, err := client.BucketExists(bucketName)
if err != nil {
Expand All @@ -37,6 +39,7 @@ func S3Write(client MinioClient, bucketName, objectName, location string, conten
return nil
}

// S3Read is the function that reads from s3
func S3Read(client MinioClient, bucketName, objectName string) (string, error) {
tempFile, err := ioutil.TempFile("/tmp", "tempS3ObjectFile")
if err != nil {
Expand Down

0 comments on commit 0cfe483

Please sign in to comment.