Skip to content

Commit e4aee69

Browse files
committed
Update to go 1.23
1 parent 710045b commit e4aee69

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
go-version: [1.22.x, 1.23.x]
9+
go-version: [1.23.x]
1010

1111
services:
1212
redis:

dates/i18n.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package dates
22

33
import (
44
_ "embed"
5+
"maps"
6+
"slices"
57

68
"github.com/nyaruka/gocommon/i18n"
79
"github.com/nyaruka/gocommon/jsonx"
8-
"golang.org/x/exp/maps"
910
)
1011

1112
// File containing day and month translations, generated using https://github.com/nyaruka/go-locales
@@ -30,7 +31,7 @@ var defaultLocale = "en_US"
3031
func init() {
3132
jsonx.MustUnmarshal(i18nJSON, &translations)
3233

33-
bcp47Matcher = i18n.NewBCP47Matcher(maps.Keys(translations)...)
34+
bcp47Matcher = i18n.NewBCP47Matcher(slices.Collect(maps.Keys(translations))...)
3435

3536
// not all locales have AM/PM values.. but it's simpler if we just given them a default
3637
for _, trans := range translations {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/nyaruka/gocommon
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.30.5
@@ -22,7 +22,6 @@ require (
2222
github.com/nyaruka/phonenumbers v1.4.0
2323
github.com/shopspring/decimal v1.4.0
2424
github.com/stretchr/testify v1.9.0
25-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
2625
golang.org/x/net v0.27.0
2726
golang.org/x/sync v0.7.0
2827
golang.org/x/text v0.16.0
@@ -52,6 +51,7 @@ require (
5251
github.com/leodido/go-urn v1.4.0 // indirect
5352
github.com/pmezard/go-difflib v1.0.0 // indirect
5453
golang.org/x/crypto v0.25.0 // indirect
54+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
5555
golang.org/x/sys v0.22.0 // indirect
5656
google.golang.org/protobuf v1.34.2 // indirect
5757
gopkg.in/yaml.v3 v3.0.1 // indirect

httpx/mock.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66
"errors"
77
"fmt"
88
"io"
9+
"maps"
910
"net/http"
11+
"slices"
1012

1113
"github.com/nyaruka/gocommon/jsonx"
1214
"github.com/nyaruka/gocommon/stringsx"
13-
"golang.org/x/exp/maps"
1415
)
1516

1617
// MockRequestor is a requestor which can be mocked with responses for given URLs
@@ -42,7 +43,7 @@ func (r *MockRequestor) Do(client *http.Client, request *http.Request) (*http.Re
4243
url := request.URL.String()
4344

4445
// find the most specific match against this URL
45-
match := stringsx.GlobSelect(url, maps.Keys(r.mocks)...)
46+
match := stringsx.GlobSelect(url, slices.Collect(maps.Keys(r.mocks))...)
4647
mockedResponses := r.mocks[match]
4748

4849
if len(mockedResponses) == 0 {

0 commit comments

Comments
 (0)