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:
silverwind
2026-08-19 23:21:38 +02:00
parent 052bc4b496
commit c15e6e793b
15 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -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()
}
+1 -1
View File
@@ -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"
)