Fix port collision checks for TCP and UDP

This commit is contained in:
Manuel de Brito Fontes 2017-11-05 18:55:31 -03:00
parent 311d286a34
commit e2b74db389
2 changed files with 19 additions and 6 deletions

View file

@ -49,3 +49,12 @@ func sysctlFSFileMax() int {
}
return int(rLimit.Max)
}
func intInSlice(i int, list []int) bool {
for _, v := range list {
if v == i {
return true
}
}
return false
}