Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion command/ca/acme/eab/sigchild.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package eab

Expand Down
1 change: 0 additions & 1 deletion command/ca/acme/eab/sigchild_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package eab

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.0

require (
github.com/Microsoft/go-winio v0.6.2
github.com/ccoveille/go-safecast v1.7.0
github.com/ccoveille/go-safecast v1.8.1
github.com/fxamacker/cbor/v2 v2.9.0
github.com/go-jose/go-jose/v3 v3.0.4
github.com/google/go-cmp v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/ccoveille/go-safecast v1.7.0 h1:i+0eldPFBeXCTARGyocNS6BNRomquA/GhTZVNEtaIXI=
github.com/ccoveille/go-safecast v1.7.0/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
github.com/ccoveille/go-safecast v1.8.1 h1:RoucjfYKKcx2lFmIjRjuo8AeX9k/GaZn5SUMHlA3kMw=
github.com/ccoveille/go-safecast v1.8.1/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down
14 changes: 7 additions & 7 deletions internal/cast/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type number interface {
}

func SafeUint(x int) (uint, error) {
return safecast.ToUint(x)
return safecast.Convert[uint](x)
}

func Uint(x int) uint {
Expand All @@ -30,7 +30,7 @@ func Uint(x int) uint {
}

func SafeInt(x uint) (int, error) {
return safecast.ToInt(x)
return safecast.Convert[int](x)
}

func Int(x uint) int {
Expand All @@ -43,7 +43,7 @@ func Int(x uint) int {
}

func SafeInt64[T number](x T) (int64, error) {
return safecast.ToInt64(x)
return safecast.Convert[int64](x)
}

func Int64[T number](x T) int64 {
Expand All @@ -56,7 +56,7 @@ func Int64[T number](x T) int64 {
}

func SafeUint64[T signed](x T) (uint64, error) {
return safecast.ToUint64(x)
return safecast.Convert[uint64](x)
}

func Uint64[T signed](x T) uint64 {
Expand All @@ -69,7 +69,7 @@ func Uint64[T signed](x T) uint64 {
}

func SafeInt32[T signed](x T) (int32, error) {
return safecast.ToInt32(x)
return safecast.Convert[int32](x)
}

func Int32[T signed](x T) int32 {
Expand All @@ -82,7 +82,7 @@ func Int32[T signed](x T) int32 {
}

func SafeUint32[T number](x T) (uint32, error) {
return safecast.ToUint32(x)
return safecast.Convert[uint32](x)
}

func Uint32[T number](x T) uint32 {
Expand All @@ -95,7 +95,7 @@ func Uint32[T number](x T) uint32 {
}

func SafeUint8(x int) (uint8, error) {
return safecast.ToUint8(x)
return safecast.Convert[uint8](x)
}

func Uint8(x int) uint8 {
Expand Down
1 change: 0 additions & 1 deletion internal/sshutil/agent_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris

package sshutil

Expand Down
1 change: 0 additions & 1 deletion utils/sysutils/sysutils_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris

package sysutils

Expand Down