fix small mistakon
This commit is contained in:
parent
059df03e09
commit
49634c0b1d
@ -434,7 +434,7 @@ func getPortRanges(rangeStr string) (portRanges [][2]int64, err error) {
|
|||||||
for _, portRangeStr := range rangeArray {
|
for _, portRangeStr := range rangeArray {
|
||||||
// 1000-2000 or 2001
|
// 1000-2000 or 2001
|
||||||
portArray := strings.Split(portRangeStr, "-")
|
portArray := strings.Split(portRangeStr, "-")
|
||||||
// lenght: only 1 or 2 is correct
|
// length: only 1 or 2 is correct
|
||||||
rangeType := len(portArray)
|
rangeType := len(portArray)
|
||||||
if rangeType == 1 {
|
if rangeType == 1 {
|
||||||
singlePort, err := strconv.ParseInt(portArray[0], 10, 64)
|
singlePort, err := strconv.ParseInt(portArray[0], 10, 64)
|
||||||
|
Loading…
Reference in New Issue
Block a user