diff --git a/storage/pkg/storage.go b/storage/pkg/storage.go index 624d94d517..7d3b2eced2 100644 --- a/storage/pkg/storage.go +++ b/storage/pkg/storage.go @@ -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") } \ No newline at end of file