Skip to content

Commit 0513aca

Browse files
authored
More plural fixups (#165)
Signed-off-by: Adam Fowler <[email protected]>
1 parent 306ee73 commit 0513aca

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Sources/Valkey/Commands/ConnectionCommands.swift

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ extension CLIENT {
537537
}
538538
public var status: Status
539539
public var clientId: Int?
540-
public var prefixs: [String]
540+
public var prefixes: [String]
541541
public var bcast: Bool
542542
public var optin: Bool
543543
public var optout: Bool
@@ -546,15 +546,15 @@ extension CLIENT {
546546
@inlinable public init(
547547
status: Status,
548548
clientId: Int? = nil,
549-
prefixs: [String] = [],
549+
prefixes: [String] = [],
550550
bcast: Bool = false,
551551
optin: Bool = false,
552552
optout: Bool = false,
553553
noloop: Bool = false
554554
) {
555555
self.status = status
556556
self.clientId = clientId
557-
self.prefixs = prefixs
557+
self.prefixes = prefixes
558558
self.bcast = bcast
559559
self.optin = optin
560560
self.optout = optout
@@ -567,7 +567,7 @@ extension CLIENT {
567567
"TRACKING",
568568
status,
569569
RESPWithToken("REDIRECT", clientId),
570-
RESPWithToken("PREFIX", prefixs),
570+
RESPWithToken("PREFIX", prefixes),
571571
RESPPureToken("BCAST", bcast),
572572
RESPPureToken("OPTIN", optin),
573573
RESPPureToken("OPTOUT", optout),
@@ -1043,14 +1043,22 @@ extension ValkeyClientProtocol {
10431043
public func clientTracking(
10441044
status: CLIENT.TRACKING.Status,
10451045
clientId: Int? = nil,
1046-
prefixs: [String] = [],
1046+
prefixes: [String] = [],
10471047
bcast: Bool = false,
10481048
optin: Bool = false,
10491049
optout: Bool = false,
10501050
noloop: Bool = false
10511051
) async throws {
10521052
_ = try await send(
1053-
command: CLIENT.TRACKING(status: status, clientId: clientId, prefixs: prefixs, bcast: bcast, optin: optin, optout: optout, noloop: noloop)
1053+
command: CLIENT.TRACKING(
1054+
status: status,
1055+
clientId: clientId,
1056+
prefixes: prefixes,
1057+
bcast: bcast,
1058+
optin: optin,
1059+
optout: optout,
1060+
noloop: noloop
1061+
)
10541062
)
10551063
}
10561064

Sources/_ValkeyCommandsBuilder/ValkeyCommandsRender.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ extension ValkeyCommand.Argument {
828828
name
829829
} else if self.name.last == "y", self.name.dropLast().last != "e" {
830830
"\(self.name.dropLast())ies"
831+
} else if self.name.last == "x" {
832+
"\(self.name)es"
831833
} else {
832834
"\(self.name)s"
833835
}

0 commit comments

Comments
 (0)