summaryrefslogtreecommitdiffstats
path: root/models/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/attachment.go')
-rw-r--r--models/attachment.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/attachment.go b/models/attachment.go
index a5f264b32b..6c3996ff01 100644
--- a/models/attachment.go
+++ b/models/attachment.go
@@ -14,7 +14,7 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
- gouuid "github.com/satori/go.uuid"
+ gouuid "github.com/google/uuid"
"xorm.io/xorm"
)
@@ -97,7 +97,7 @@ func (a *Attachment) LinkedRepository() (*Repository, UnitType, error) {
// NewAttachment creates a new attachment object.
func NewAttachment(attach *Attachment, buf []byte, file io.Reader) (_ *Attachment, err error) {
- attach.UUID = gouuid.NewV4().String()
+ attach.UUID = gouuid.New().String()
localPath := attach.LocalPath()
if err = os.MkdirAll(path.Dir(localPath), os.ModePerm); err != nil {