Skip to content

Commit ce1fb68

Browse files
authored
Merge pull request #1510 from smallstep/dependabot/go_modules/github.com/ccoveille/go-safecast-1.8.1
Bump github.com/ccoveille/go-safecast from 1.7.0 to 1.8.1
2 parents 9b02d1e + bccc1bc commit ce1fb68

7 files changed

Lines changed: 10 additions & 14 deletions

File tree

command/ca/acme/eab/sigchild.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !windows
2-
// +build !windows
32

43
package eab
54

command/ca/acme/eab/sigchild_windows.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build windows
2-
// +build windows
32

43
package eab
54

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24.0
44

55
require (
66
github.com/Microsoft/go-winio v0.6.2
7-
github.com/ccoveille/go-safecast v1.7.0
7+
github.com/ccoveille/go-safecast v1.8.1
88
github.com/fxamacker/cbor/v2 v2.9.0
99
github.com/go-jose/go-jose/v3 v3.0.4
1010
github.com/google/go-cmp v0.7.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
8484
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
8585
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
8686
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
87-
github.com/ccoveille/go-safecast v1.7.0 h1:i+0eldPFBeXCTARGyocNS6BNRomquA/GhTZVNEtaIXI=
88-
github.com/ccoveille/go-safecast v1.7.0/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
87+
github.com/ccoveille/go-safecast v1.8.1 h1:RoucjfYKKcx2lFmIjRjuo8AeX9k/GaZn5SUMHlA3kMw=
88+
github.com/ccoveille/go-safecast v1.8.1/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
8989
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
9090
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
9191
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=

internal/cast/cast.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type number interface {
1717
}
1818

1919
func SafeUint(x int) (uint, error) {
20-
return safecast.ToUint(x)
20+
return safecast.Convert[uint](x)
2121
}
2222

2323
func Uint(x int) uint {
@@ -30,7 +30,7 @@ func Uint(x int) uint {
3030
}
3131

3232
func SafeInt(x uint) (int, error) {
33-
return safecast.ToInt(x)
33+
return safecast.Convert[int](x)
3434
}
3535

3636
func Int(x uint) int {
@@ -43,7 +43,7 @@ func Int(x uint) int {
4343
}
4444

4545
func SafeInt64[T number](x T) (int64, error) {
46-
return safecast.ToInt64(x)
46+
return safecast.Convert[int64](x)
4747
}
4848

4949
func Int64[T number](x T) int64 {
@@ -56,7 +56,7 @@ func Int64[T number](x T) int64 {
5656
}
5757

5858
func SafeUint64[T signed](x T) (uint64, error) {
59-
return safecast.ToUint64(x)
59+
return safecast.Convert[uint64](x)
6060
}
6161

6262
func Uint64[T signed](x T) uint64 {
@@ -69,7 +69,7 @@ func Uint64[T signed](x T) uint64 {
6969
}
7070

7171
func SafeInt32[T signed](x T) (int32, error) {
72-
return safecast.ToInt32(x)
72+
return safecast.Convert[int32](x)
7373
}
7474

7575
func Int32[T signed](x T) int32 {
@@ -82,7 +82,7 @@ func Int32[T signed](x T) int32 {
8282
}
8383

8484
func SafeUint32[T number](x T) (uint32, error) {
85-
return safecast.ToUint32(x)
85+
return safecast.Convert[uint32](x)
8686
}
8787

8888
func Uint32[T number](x T) uint32 {
@@ -95,7 +95,7 @@ func Uint32[T number](x T) uint32 {
9595
}
9696

9797
func SafeUint8(x int) (uint8, error) {
98-
return safecast.ToUint8(x)
98+
return safecast.Convert[uint8](x)
9999
}
100100

101101
func Uint8(x int) uint8 {

internal/sshutil/agent_unix.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
2-
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
32

43
package sshutil
54

utils/sysutils/sysutils_unix.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
2-
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
32

43
package sysutils
54

0 commit comments

Comments
 (0)