Skip to content

Commit

Permalink
♻️ refactor: update validator
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyuexing committed Dec 26, 2024
1 parent 228d4c3 commit 1e483f4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions validatetor_64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build amd64 || arm64
// +build amd64 arm64

package utils

func IsIntegerNotMax(val int) bool {
return val < 0x7FFFFFFFFFFFFFFF
}
3 changes: 0 additions & 3 deletions validator.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package utils

func IsIntegerNotMax(val int) bool {
return val < 0x7FFFFFFFFFFFFFFF
}

func IsNonNegative(val int) bool {
return val >= 0
Expand Down
8 changes: 8 additions & 0 deletions validator_x86.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// +build 386
//go:build 386

package utils

func IsIntegerNotMax(val int) bool {
return val < 0x7FFFFFFF
}

0 comments on commit 1e483f4

Please sign in to comment.