mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-09 18:21:32 +09:00
hscontrol: use the stdlib uuid package
Go 1.27 ships RFC 9562 UUIDs and NewV4 cannot fail, dropping gofrs/uuid and two error paths.
This commit is contained in:
committed by
Kristoffer Dalby
parent
9f7d829aa5
commit
1c6809089f
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"vendor": {
|
||||
"goModSum": "sha256-c5zqlgQKbVs9Y9FXHkdZh17FqyXPLh/j+XYQj/IPW8k=",
|
||||
"sri": "sha256-zWcaRben+px9w6NcUPkYfR6DbBJhwdYsXcZ5cm95hmo="
|
||||
"goModSum": "sha256-FqwMYiHc0uc873IaVIs6tJ5Dsk7BTWamm7s8FzFzC4U=",
|
||||
"sri": "sha256-uZ2BZ2xBOb2JMOV/ao74vRlY/7m0Tj1Pu84tc3s0+rE="
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ require (
|
||||
github.com/go-chi/metrics v0.1.1
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.6
|
||||
github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6
|
||||
github.com/gofrs/uuid/v5 v5.4.0
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7
|
||||
github.com/jagottsicher/termcolor v1.0.2
|
||||
|
||||
@@ -223,8 +223,6 @@ github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
|
||||
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
|
||||
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
|
||||
github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=
|
||||
github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
_ "embed"
|
||||
"net/http"
|
||||
textTemplate "text/template"
|
||||
"uuid"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/juanfont/headscale/hscontrol/templates"
|
||||
)
|
||||
|
||||
@@ -41,17 +41,8 @@ func (h *Headscale) ApplePlatformConfig(
|
||||
return
|
||||
}
|
||||
|
||||
id, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
httpError(writer, err)
|
||||
return
|
||||
}
|
||||
|
||||
contentID, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
httpError(writer, err)
|
||||
return
|
||||
}
|
||||
id := uuid.NewV4()
|
||||
contentID := uuid.NewV4()
|
||||
|
||||
platformConfig := AppleMobilePlatformConfig{
|
||||
UUID: contentID,
|
||||
|
||||
Reference in New Issue
Block a user