Upgrade to go 1.23 (#110)

This commit is contained in:
Joshua Blum 2025-01-07 11:27:24 -05:00 committed by GitHub
parent ca7ff7cd79
commit 3747e5bfbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 12 deletions

View file

@ -10,7 +10,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.19.x, 1.20.x, 1.21.x]
go-version: [1.21.x, 1.22.x, 1.23.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
@ -21,6 +21,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
version: v1.63
- run: go vet ./...
- run: go test -tags skipsecretserviceintegrationtests ./...

View file

@ -9,3 +9,5 @@ linters:
- gofmt
- gocritic
- unconvert
- revive
- govet

View file

@ -34,8 +34,8 @@ func unixToAbsoluteTime(s int64, ns int64) C.CFAbsoluteTime {
}
func absoluteTimeToUnix(abs C.CFAbsoluteTime) (int64, int64) {
int, frac := math.Modf(float64(abs))
return int64(int) + absoluteTimeIntervalSince1970(), int64(frac * nsPerSec)
i, frac := math.Modf(float64(abs))
return int64(i) + absoluteTimeIntervalSince1970(), int64(frac * nsPerSec)
}
// TimeToCFDate will convert the given time.Time to a CFDateRef, which

6
go.mod
View file

@ -1,12 +1,12 @@
module github.com/keybase/go-keychain
go 1.19
go 1.21
require (
github.com/keybase/dbus v0.0.0-20220506165403-5aa21ea2c23a
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.31.0
github.com/stretchr/testify v1.10.0
golang.org/x/crypto v0.32.0
)
require (

8
go.sum
View file

@ -6,10 +6,10 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View file

@ -25,7 +25,7 @@ func TestKeyringDH(t *testing.T) {
func testKeyring(t *testing.T, mode AuthenticationMode) {
srv, err := NewService()
require.NoError(t, err)
session, err := srv.OpenSession(AuthenticationDHAES)
session, err := srv.OpenSession(mode)
require.NoError(t, err)
defer srv.CloseSession(session)