make proc names consistent (#18626)

* rename `endswith` to `endsWith`

* rename
This commit is contained in:
flywind
2021-08-01 19:52:24 +08:00
committed by GitHub
parent 916d0c21af
commit 2bc07554cc
9 changed files with 13 additions and 13 deletions

View File

@@ -34,7 +34,7 @@ proc readMessages(client: AsyncFD) {.async.} =
clientCount.inc
break
else:
if line.startswith("Message "):
if line.startsWith("Message "):
msgCount.inc
else:
doAssert false

View File

@@ -59,7 +59,7 @@ proc readMessages(server: AsyncSocket) {.async.} =
while i < maxResponses:
let (data, fromIp, fromPort) = await recvFrom(server, 16384)
if data.startswith("Message ") and fromIp == "127.0.0.1":
if data.startsWith("Message ") and fromIp == "127.0.0.1":
await sendTo(server, fromIp, fromPort, data)
inc(msgCount)

View File

@@ -36,7 +36,7 @@ when defined(ssl):
inc(clientCount)
break
else:
if line.startswith("Message "):
if line.startsWith("Message "):
inc(msgCount)
else:
doAssert false

View File

@@ -81,7 +81,7 @@ proc readMessages(server: AsyncFD) {.async.} =
addr(slen))
size = 0
var grammString = $cstring(addr buffer)
if grammString.startswith("Message ") and
if grammString.startsWith("Message ") and
saddr.sin_addr.s_addr == nativesockets.ntohl(INADDR_LOOPBACK.uint32):
await sendTo(server, addr grammString[0], len(grammString),
cast[ptr SockAddr](addr saddr), slen)

View File

@@ -220,7 +220,7 @@ when defined(windows):
clientCount.inc
break
else:
if line.startswith("Message "):
if line.startsWith("Message "):
msgCount.inc
else:
doAssert false