Skip to content

Commit 38af54d

Browse files
authored
Merge pull request #13 from m-lab/spellcheck
seperator -> separator
2 parents 256b10f + 94a4ca3 commit 38af54d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

connectionwatcher/connectionwatcher.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ var (
3131

3232
// parseIPAndPort returns a valid IP and port from "ss -e" output.
3333
func parseIPAndPort(input string) (string, int, error) {
34-
seperator := strings.LastIndex(input, ":")
35-
if seperator == -1 {
34+
separator := strings.LastIndex(input, ":")
35+
if separator == -1 {
3636
return "", 0, errors.New("cannot parse IP and port correctly")
3737
}
38-
IPStr := input[0:seperator]
38+
IPStr := input[0:separator]
3939
if IPStr[0] == '[' {
4040
IPStr = IPStr[1 : len(IPStr)-1]
4141
}
@@ -49,7 +49,7 @@ func parseIPAndPort(input string) (string, int, error) {
4949
return "", 0, errors.New("invalid IP address")
5050
}
5151

52-
port, err := strconv.Atoi(input[seperator+1:])
52+
port, err := strconv.Atoi(input[separator+1:])
5353
if err != nil {
5454
return "", 0, errors.New("invalid IP port")
5555
}

0 commit comments

Comments
 (0)