mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-23 04:38:56 +02:00
chore: use stdlib uuid package
Go 1.27 ships a uuid package with the same API, dropping the direct dependency on github.com/google/uuid. Assisted-by: Claude:Opus 5
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
"gitea.dev/modules/timeutil"
|
||||
webhook_module "gitea.dev/modules/webhook"
|
||||
|
||||
gouuid "github.com/google/uuid"
|
||||
"uuid"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
@@ -119,7 +119,7 @@ func HookTasks(ctx context.Context, hookID int64, page int) ([]*HookTask, error)
|
||||
// CreateHookTask creates a new hook task,
|
||||
// it handles conversion from Payload to PayloadContent.
|
||||
func CreateHookTask(ctx context.Context, t *HookTask) (*HookTask, error) {
|
||||
t.UUID = gouuid.New().String()
|
||||
t.UUID = uuid.New().String()
|
||||
if t.Delivered == 0 {
|
||||
t.Delivered = timeutil.TimeStampNanoNow()
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ import (
|
||||
"gitea.dev/modules/timeutil"
|
||||
webhook_module "gitea.dev/modules/webhook"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"uuid"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user