Skip to content

Commit deab8ed

Browse files
authored
update library, go1.24, update all deps (#285)
1 parent 07a591e commit deab8ed

62 files changed

Lines changed: 230 additions & 210 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/buildpushdev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- uses: actions/setup-go@v5
3030
with:
31-
go-version: '1.22'
31+
go-version: '1.24'
3232
cache: false
3333

3434
- name: Build and push

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Go
1515
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.22.x
17+
go-version: 1.24.x
1818

1919
- name: Checkout code
2020
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Go
1313
uses: actions/setup-go@v4
1414
with:
15-
go-version: 1.22.x
15+
go-version: 1.24.x
1616

1717
- name: Checkout code
1818
uses: actions/checkout@v4

cmd/device-definitions-api/add_vin.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ import (
1919

2020
"github.com/DIMO-Network/device-definitions-api/internal/config"
2121
"github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models"
22-
"github.com/DIMO-Network/shared"
23-
"github.com/DIMO-Network/shared/db"
22+
"github.com/DIMO-Network/shared/pkg/db"
23+
stringutils "github.com/DIMO-Network/shared/pkg/strings"
24+
vinutils "github.com/DIMO-Network/shared/pkg/vin"
2425
"github.com/google/subcommands"
2526
"github.com/pkg/errors"
2627
"github.com/rs/zerolog"
@@ -80,7 +81,7 @@ func (p *addVINCmd) Execute(ctx context.Context, _ *flag.FlagSet, _ ...interface
8081
fmt.Println("already registered")
8182
return subcommands.ExitSuccess
8283
}
83-
processedVIN := shared.VIN(vin)
84+
processedVIN := vinutils.VIN(vin)
8485
wmi, err := models.Wmis(models.WmiWhere.Wmi.EQ(processedVIN.Wmi())).One(ctx, pdb.DBS().Reader)
8586
if err != nil {
8687
fmt.Println("could not find WMI for vin")
@@ -116,12 +117,12 @@ func (p *addVINCmd) Execute(ctx context.Context, _ *flag.FlagSet, _ ...interface
116117
return subcommands.ExitFailure
117118
}
118119

119-
manufacturer, err := onChainSvc.GetManufacturer(ctx, shared.SlugString(wmi.ManufacturerName), pdb.DBS().Reader)
120+
manufacturer, err := onChainSvc.GetManufacturer(ctx, stringutils.SlugString(wmi.ManufacturerName), pdb.DBS().Reader)
120121
if err != nil {
121122
fmt.Println(err.Error())
122123
return subcommands.ExitFailure
123124
}
124-
definitionID := common.DeviceDefinitionSlug(shared.SlugString(wmi.ManufacturerName), shared.SlugString(model), int16(vinNumber.Year))
125+
definitionID := common.DeviceDefinitionSlug(stringutils.SlugString(wmi.ManufacturerName), stringutils.SlugString(model), int16(vinNumber.Year))
125126
deviceDefinition, err := onChainSvc.GetDefinitionTableland(ctx, big.NewInt(int64(manufacturer.TokenID)), definitionID)
126127

127128
if err != nil {

cmd/device-definitions-api/delete_dd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/DIMO-Network/device-definitions-api/internal/config"
1313
dd_common "github.com/DIMO-Network/device-definitions-api/internal/core/common"
1414
"github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways"
15-
"github.com/DIMO-Network/shared/db"
15+
"github.com/DIMO-Network/shared/pkg/db"
1616
"github.com/ethereum/go-ethereum/ethclient"
1717
"github.com/google/subcommands"
1818
"github.com/rs/zerolog"

cmd/device-definitions-api/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
_ "github.com/DIMO-Network/device-definitions-api/docs"
1818
"github.com/DIMO-Network/device-definitions-api/internal/config"
19-
"github.com/DIMO-Network/shared"
19+
"github.com/DIMO-Network/shared/pkg/settings"
2020
"github.com/rs/zerolog"
2121
)
2222

@@ -29,7 +29,7 @@ func main() {
2929
gitSha1 := os.Getenv("GIT_SHA1")
3030
ctx := context.Background()
3131

32-
settings, err := shared.LoadConfig[config.Settings]("settings.yaml")
32+
settings, err := settings.LoadConfig[config.Settings]("settings.yaml")
3333
if err != nil {
3434
log.Fatal("could not load settings: $s", err)
3535
}

cmd/device-definitions-api/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"flag"
66

7-
"github.com/DIMO-Network/shared/db"
7+
"github.com/DIMO-Network/shared/pkg/db"
88
"github.com/pressly/goose/v3"
99

1010
"github.com/DIMO-Network/device-definitions-api/internal/config"

cmd/device-definitions-api/sync_device_definition_search.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import (
99
models2 "github.com/DIMO-Network/device-definitions-api/internal/core/models"
1010
"github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways"
1111
"github.com/DIMO-Network/device-definitions-api/internal/infrastructure/sender"
12-
"github.com/DIMO-Network/shared"
12+
stringutils "github.com/DIMO-Network/shared/pkg/strings"
1313

1414
"github.com/ethereum/go-ethereum/ethclient"
1515

1616
"github.com/DIMO-Network/device-definitions-api/internal/config"
1717
"github.com/DIMO-Network/device-definitions-api/internal/core/common"
1818
"github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models"
19-
"github.com/DIMO-Network/shared/db"
19+
"github.com/DIMO-Network/shared/pkg/db"
2020
"github.com/google/subcommands"
2121
"github.com/rs/zerolog"
2222
"github.com/typesense/typesense-go/typesense"
@@ -176,7 +176,7 @@ func (p *syncDeviceDefinitionSearchCmd) Execute(ctx context.Context, _ *flag.Fla
176176
name := common.BuildDeviceDefinitionName(int16(dd.Year), dm.Name, dd.Model)
177177
imageUrl := dd.ImageURI
178178
modelName := dd.Model
179-
modelSlug := shared.SlugString(dd.Model)
179+
modelSlug := stringutils.SlugString(dd.Model)
180180

181181
year := dd.Year
182182
if year < 2007 {

go.mod

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
module github.com/DIMO-Network/device-definitions-api
22

3-
go 1.22.3
4-
5-
toolchain go1.22.6
3+
go 1.24
64

75
require (
8-
github.com/DIMO-Network/shared v0.12.9
6+
github.com/DIMO-Network/shared v1.0.2
97
github.com/antchfx/xmlquery v1.4.1
108
github.com/arsmn/fiber-swagger/v2 v2.31.1
119
github.com/aws/aws-sdk-go-v2/config v1.27.27
1210
github.com/docker/go-connections v0.5.0
13-
github.com/ethereum/go-ethereum v1.14.7
11+
github.com/ethereum/go-ethereum v1.15.10
1412
github.com/friendsofgo/errors v0.9.2
15-
github.com/goccy/go-json v0.10.2
13+
github.com/goccy/go-json v0.10.4
1614
github.com/gofiber/adaptor/v2 v2.2.1
1715
github.com/gofiber/contrib/jwt v1.0.10
1816
github.com/gofiber/fiber/v2 v2.52.5
@@ -27,7 +25,7 @@ require (
2725
github.com/pressly/goose/v3 v3.21.1
2826
github.com/prometheus/client_golang v1.19.1
2927
github.com/segmentio/ksuid v1.0.4
30-
github.com/stretchr/testify v1.9.0
28+
github.com/stretchr/testify v1.10.0
3129
github.com/swaggo/swag v1.16.3
3230
github.com/testcontainers/testcontainers-go v0.32.0
3331
github.com/tidwall/sjson v1.2.5
@@ -62,20 +60,21 @@ require (
6260
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect
6361
github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect
6462
github.com/beorn7/perks v1.0.1 // indirect
65-
github.com/bits-and-blooms/bitset v1.13.0 // indirect
66-
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
63+
github.com/bits-and-blooms/bitset v1.22.0 // indirect
6764
github.com/cespare/xxhash/v2 v2.3.0 // indirect
68-
github.com/consensys/bavard v0.1.13 // indirect
69-
github.com/consensys/gnark-crypto v0.13.0 // indirect
65+
github.com/consensys/bavard v0.1.30 // indirect
66+
github.com/consensys/gnark-crypto v0.17.0 // indirect
7067
github.com/containerd/log v0.1.0 // indirect
7168
github.com/containerd/platforms v0.2.1 // indirect
7269
github.com/cpuguy83/dockercfg v0.3.1 // indirect
70+
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
7371
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
7472
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
75-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
73+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
7674
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
7775
github.com/distribution/reference v0.6.0 // indirect
7876
github.com/ethereum/c-kzg-4844 v1.0.3 // indirect
77+
github.com/ethereum/go-verkle v0.2.2 // indirect
7978
github.com/felixge/httpsnoop v1.0.4 // indirect
8079
github.com/fsnotify/fsnotify v1.7.0 // indirect
8180
github.com/go-logr/logr v1.4.2 // indirect
@@ -87,7 +86,7 @@ require (
8786
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
8887
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
8988
github.com/gorilla/websocket v1.5.3 // indirect
90-
github.com/holiman/uint256 v1.3.1 // indirect
89+
github.com/holiman/uint256 v1.3.2 // indirect
9190
github.com/lib/pq v1.10.9 // indirect
9291
github.com/lufia/plan9stats v0.0.0-20240513124658-fba389f38bae // indirect
9392
github.com/mattn/go-colorable v0.1.13 // indirect
@@ -113,7 +112,7 @@ require (
113112
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
114113
github.com/shoenig/go-m1cpu v0.1.6 // indirect
115114
github.com/sony/gobreaker v1.0.0 // indirect
116-
github.com/supranational/blst v0.3.13 // indirect
115+
github.com/supranational/blst v0.3.14 // indirect
117116
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
118117
github.com/tidwall/match v1.1.1 // indirect
119118
github.com/tidwall/pretty v1.2.1 // indirect
@@ -127,10 +126,10 @@ require (
127126
go.opentelemetry.io/otel/metric v1.29.0 // indirect
128127
go.opentelemetry.io/otel/trace v1.29.0 // indirect
129128
go.uber.org/multierr v1.11.0 // indirect
130-
golang.org/x/crypto v0.28.0 // indirect
129+
golang.org/x/crypto v0.37.0 // indirect
131130
golang.org/x/oauth2 v0.23.0 // indirect
132-
golang.org/x/sync v0.8.0 // indirect
133-
golang.org/x/time v0.7.0 // indirect
131+
golang.org/x/sync v0.14.0 // indirect
132+
golang.org/x/time v0.9.0 // indirect
134133
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
135134
rsc.io/tmplfunc v0.0.3 // indirect
136135
)
@@ -179,10 +178,10 @@ require (
179178
github.com/valyala/tcplisten v1.0.0 // indirect
180179
github.com/volatiletech/inflect v0.0.1 // indirect
181180
github.com/volatiletech/randomize v0.0.1 // indirect
182-
golang.org/x/net v0.30.0 // indirect
183-
golang.org/x/sys v0.26.0 // indirect
184-
golang.org/x/text v0.19.0 // indirect
185-
golang.org/x/tools v0.23.0 // indirect
181+
golang.org/x/net v0.36.0 // indirect
182+
golang.org/x/sys v0.33.0 // indirect
183+
golang.org/x/text v0.24.0 // indirect
184+
golang.org/x/tools v0.29.0 // indirect
186185
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
187186
gopkg.in/yaml.v3 v3.0.1
188187
)

0 commit comments

Comments
 (0)