1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 15:07:20 +00:00

Use google/uuid to instead satori/go.uuid (#11943) (#11946)

Co-authored-by: Lauris BH <lauris@nix.lv>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao
2020-06-18 22:06:48 +08:00
committed by GitHub
parent d534007bc4
commit 82343f4943
38 changed files with 967 additions and 817 deletions

View File

@ -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 {