Switch to google/uuid from satori/go.uuid (#2852)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -3,9 +3,9 @@ package storagesvc
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/fission/fission/pkg/utils/uuid"
|
||||
"github.com/graymeta/stow"
|
||||
_ "github.com/graymeta/stow/local"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
type localStorage struct {
|
||||
@@ -35,11 +35,7 @@ func (ls localStorage) getStorageType() StorageType {
|
||||
func (ls localStorage) getUploadFileName() (string, error) {
|
||||
// This is not the item ID (that's returned by Put)
|
||||
// should we just use handler.Filename? what are the constraints here?
|
||||
id, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return id.String(), err
|
||||
return uuid.NewString(), nil
|
||||
}
|
||||
|
||||
func (ls localStorage) getSubDir() string {
|
||||
|
||||
@@ -6,7 +6,8 @@ import (
|
||||
|
||||
"github.com/graymeta/stow"
|
||||
"github.com/graymeta/stow/s3"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/fission/fission/pkg/utils/uuid"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -54,11 +55,8 @@ func (ss s3Storage) getSubDir() string {
|
||||
}
|
||||
|
||||
func (ss s3Storage) getUploadFileName() (string, error) {
|
||||
id, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return path.Join(ss.subDir, id.String()), nil
|
||||
id := uuid.NewString()
|
||||
return path.Join(ss.subDir, id), nil
|
||||
}
|
||||
|
||||
func (ss s3Storage) dial() (stow.Location, error) {
|
||||
|
||||
Reference in New Issue
Block a user