Fix bug for s3 storage

Signed-off-by: shengjh <1572099106@qq.com>
This commit is contained in:
shengjh 2020-09-25 16:12:33 +08:00 committed by yefu.chen
parent aa2ff7a971
commit 6554b2cf16

View File

@ -3,9 +3,9 @@ package storage
import (
"context"
"errors"
S3Driver "github.com/czs007/suvlim/storage/internal/S3"
minIODriver "github.com/czs007/suvlim/storage/internal/minio"
tikvDriver "github.com/czs007/suvlim/storage/internal/tikv"
S3Driver "github.com/czs007/suvlim/storage/internal/S3"
"github.com/czs007/suvlim/storage/pkg/types"
)
@ -28,6 +28,11 @@ func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error)
return store, nil
case types.S3DRIVER:
store , err = S3Driver.NewS3Driver(ctx)
if err != nil {
//panic(err.Error())
return nil, err
}
return store, nil
}
return nil, errors.New("unsupported driver")
}