mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
fix: deprecate skyring/uuid and use maintained google/uuid (#9340)
This commit is contained in:
@@ -19,9 +19,9 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/minio/minio-go/v6/pkg/s3utils"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/skyrings/skyring-common/tools/uuid"
|
||||
)
|
||||
|
||||
// Checks on GetObject arguments, bucket and object.
|
||||
@@ -105,16 +105,8 @@ func checkListMultipartArgs(ctx context.Context, bucket, prefix, keyMarker, uplo
|
||||
KeyMarker: keyMarker,
|
||||
}
|
||||
}
|
||||
id, err := uuid.Parse(uploadIDMarker)
|
||||
if err != nil {
|
||||
if _, err := uuid.Parse(uploadIDMarker); err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
return err
|
||||
}
|
||||
if id.IsZero() {
|
||||
logger.LogIf(ctx, MalformedUploadID{
|
||||
UploadID: uploadIDMarker,
|
||||
})
|
||||
|
||||
return MalformedUploadID{
|
||||
UploadID: uploadIDMarker,
|
||||
}
|
||||
|
||||
@@ -1032,7 +1032,7 @@ func testListMultipartUploads(obj ObjectLayer, instanceType string, t TestErrHan
|
||||
{bucketNames[0], "asia", "asia/europe/", "abc", "", 0, ListMultipartsInfo{},
|
||||
fmt.Errorf("Invalid combination of uploadID marker '%s' and marker '%s'", "abc", "asia/europe/"), false},
|
||||
{bucketNames[0], "asia", "asia/europe", "abc", "", 0, ListMultipartsInfo{},
|
||||
fmt.Errorf("unknown UUID string %s", "abc"), false},
|
||||
fmt.Errorf("Malformed upload id %s", "abc"), false},
|
||||
|
||||
// Setting up valid case of ListMultiPartUploads.
|
||||
// Test case with multiple parts for a single uploadID (Test number 13).
|
||||
|
||||
@@ -32,6 +32,7 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/klauspost/compress/s2"
|
||||
"github.com/klauspost/readahead"
|
||||
"github.com/minio/minio-go/v6/pkg/s3utils"
|
||||
@@ -44,7 +45,6 @@ import (
|
||||
"github.com/minio/minio/pkg/hash"
|
||||
"github.com/minio/minio/pkg/ioutil"
|
||||
"github.com/minio/minio/pkg/wildcard"
|
||||
"github.com/skyrings/skyring-common/tools/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -216,12 +216,12 @@ func pathJoin(elem ...string) string {
|
||||
|
||||
// mustGetUUID - get a random UUID.
|
||||
func mustGetUUID() string {
|
||||
uuid, err := uuid.New()
|
||||
u, err := uuid.NewRandom()
|
||||
if err != nil {
|
||||
logger.CriticalIf(GlobalContext, err)
|
||||
}
|
||||
|
||||
return uuid.String()
|
||||
return u.String()
|
||||
}
|
||||
|
||||
// Create an s3 compatible MD5sum for complete multipart transaction.
|
||||
|
||||
Reference in New Issue
Block a user