Shift operations should be unsigned integers
This commit is contained in:
parent
336f12e56a
commit
f97d30ec19
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var shiftIndex = []int{24, 16, 8, 0}
|
var shiftIndex = []uint32{24, 16, 8, 0}
|
||||||
|
|
||||||
func CheckIP(ip string) (uint32, error) {
|
func CheckIP(ip string) (uint32, error) {
|
||||||
var ps = strings.Split(ip, ".")
|
var ps = strings.Split(ip, ".")
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// Util function
|
// Util function
|
||||||
|
|
||||||
var shiftIndex = []int{24, 16, 8, 0}
|
var shiftIndex = []uint32{24, 16, 8, 0}
|
||||||
|
|
||||||
func CheckIP(ip string) (uint32, error) {
|
func CheckIP(ip string) (uint32, error) {
|
||||||
var ps = strings.Split(ip, ".")
|
var ps = strings.Split(ip, ".")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue