objutil/limits.go
func CheckInt64Bounds(v int64, min int64, max uint64, t reflect.Type) (err error) {
	if v < min {
		err = fmt.Errorf("objconv: %d overflows the minimum value of %d for %s", v, min, t)
	}
	if v > 0 && uint64(v) > max {
		err = fmt.Errorf("objconv: %d overflows the maximum value of %d for %s", v, max, t)
	}
	return
}
func CheckInt64Bounds(v int64, min int64, max uint64, t reflect.Type) (err error) {
	if v < min {
		err = fmt.Errorf("objconv: %d overflows the minimum value of %d for %s", v, min, t)
	}
	if v > 0 && uint64(v) > max {
		err = fmt.Errorf("objconv: %d overflows the maximum value of %d for %s", v, max, t)
	}
	return
}
// CheckInt64Bounds verifies that v is within min and max, t represents the
// original type of v.