Skip to content

Commit 6e31d16

Browse files
authored
Update opensource modules to use typeid/v2 (#526)
## Summary Update opensource modules to use typeid/v2 ## How was it tested? Ran tests. ## Community Contribution License All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 License as stated in the [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
1 parent ac4c4c9 commit 6e31d16

File tree

15 files changed

+26
-17
lines changed

15 files changed

+26
-17
lines changed

go.work.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/
140140
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
141141
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
142142
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
143-
go.jetify.com/typeid v1.3.0/go.mod h1:CtVGyt2+TSp4Rq5+ARLvGsJqdNypKBAC6INQ9TLPlmk=
144-
go.jetify.com/typeid v1.3.1-0.20241211224430-39758d55f188/go.mod h1:Qlbkqu/YQVknz7AhsKUnDJDmOfKR6G/YUiEbxt12PXY=
145-
go.jetify.com/typeid v1.3.1-0.20250602221042-e26d10b64640/go.mod h1:x8vtxYf2h/0T0a4fS2K2vqVM0aBsGwkw03tal6PxK1s=
143+
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d h1:KfAndOJ7MZvJki9kM/C7diLvGtbU64O5ZCCdvwUgXYc=
144+
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d/go.mod h1:x8vtxYf2h/0T0a4fS2K2vqVM0aBsGwkw03tal6PxK1s=
146145
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
147146
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
148147
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg=

pkg/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/spf13/cobra v1.9.1
2525
github.com/stretchr/testify v1.10.0
2626
github.com/tailscale/hujson v0.0.0-20250226034555-ec1d1c113d33
27-
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d
27+
go.jetify.com/typeid/v2 v2.0.0-alpha.2
2828
golang.org/x/oauth2 v0.28.0
2929
golang.org/x/sys v0.31.0
3030
google.golang.org/protobuf v1.36.5
@@ -52,6 +52,7 @@ require (
5252
github.com/pmezard/go-difflib v1.0.0 // indirect
5353
github.com/spf13/pflag v1.0.6 // indirect
5454
github.com/ulikunitz/xz v0.5.12 // indirect
55+
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d // indirect
5556
golang.org/x/crypto v0.36.0 // indirect
5657
golang.org/x/net v0.38.0 // indirect
5758
)

pkg/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o
9696
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
9797
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d h1:KfAndOJ7MZvJki9kM/C7diLvGtbU64O5ZCCdvwUgXYc=
9898
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d/go.mod h1:x8vtxYf2h/0T0a4fS2K2vqVM0aBsGwkw03tal6PxK1s=
99+
go.jetify.com/typeid/v2 v2.0.0-alpha.2 h1:fuBR+uZRfJVBQ3EIN0JeQd3EKRbfVAYiY/S37dm8SeU=
100+
go.jetify.com/typeid/v2 v2.0.0-alpha.2/go.mod h1:XJylExBUgyKTEoTtUfwD6VuoZJ/gxcWrLHUbAmIIj2E=
99101
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
100102
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
101103
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=

pkg/ids/apitoken.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ids
22

33
import (
4-
"go.jetify.com/typeid"
4+
"go.jetify.com/typeid/v2"
55
)
66

77
const APITokenPrefix = "api_token"

pkg/ids/ids.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package ids
77
import (
88
"fmt"
99

10-
"go.jetify.com/typeid"
10+
"go.jetify.com/typeid/v2"
1111
)
1212

1313
const UserPrefix = "user"

typeid/typeid-go/constructors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strings"
66

77
"github.com/gofrs/uuid/v5"
8-
"go.jetify.com/typeid/base32"
8+
"go.jetify.com/typeid/v2/base32"
99
)
1010

1111
// Generate returns a new TypeID with the given prefix and a random suffix.

typeid/typeid-go/go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ go 1.24.0
55
require (
66
github.com/gofrs/uuid/v5 v5.3.2
77
github.com/stretchr/testify v1.10.0
8-
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d
98
gopkg.in/yaml.v2 v2.4.0
109
)
1110

1211
require (
1312
github.com/davecgh/go-spew v1.1.1 // indirect
14-
github.com/kr/text v0.2.0 // indirect
13+
github.com/kr/pretty v0.3.1 // indirect
1514
github.com/pmezard/go-difflib v1.0.0 // indirect
15+
github.com/rogpeppe/go-internal v1.14.1 // indirect
16+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
1617
gopkg.in/yaml.v3 v3.0.1 // indirect
1718
)

typeid/typeid-go/go.sum

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/gofrs/uuid/v5 v5.3.2 h1:2jfO8j3XgSwlz/wHqemAEugfnTlikAYHhnqQ8Xh4fE0=
55
github.com/gofrs/uuid/v5 v5.3.2/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
6+
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
67
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
78
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
9+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
10+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
811
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
912
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
13+
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
1014
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1115
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
16+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
1217
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
1318
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
1419
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
1520
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
16-
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d h1:KfAndOJ7MZvJki9kM/C7diLvGtbU64O5ZCCdvwUgXYc=
17-
go.jetify.com/typeid v1.3.1-0.20250708200829-05dce5112f3d/go.mod h1:x8vtxYf2h/0T0a4fS2K2vqVM0aBsGwkw03tal6PxK1s=
1821
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1922
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
2023
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

typeid/typeid-go/typeid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package typeid
22

33
import (
44
"github.com/gofrs/uuid/v5"
5-
"go.jetify.com/typeid/base32"
5+
"go.jetify.com/typeid/v2/base32"
66
)
77

88
// TypeID is a unique identifier with a given type as defined by the TypeID spec

typeid/typeid-go/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package typeid
33
import (
44
"fmt"
55

6-
"go.jetify.com/typeid/base32"
6+
"go.jetify.com/typeid/v2/base32"
77
)
88

99
func validatePrefix(prefix string) error {

0 commit comments

Comments
 (0)