MCPcopy
hub / github.com/redis/go-redis / hasKeys

Method hasKeys

osscluster_router.go:504–507  ·  view source on GitHub ↗

hasKeys checks if a command operates on keys

(cmd Cmder)

Source from the content-addressed store, hash-verified

502
503// hasKeys checks if a command operates on keys
504func (c *ClusterClient) hasKeys(cmd Cmder) bool {
505 firstKeyPos := cmdFirstKeyPosWithInfo(cmd, c.cmdInfoPeek(cmd.Name()))
506 return firstKeyPos > 0
507}
508
509func (c *ClusterClient) readOnlyEnabled() bool {
510 return c.opt.ReadOnly

Callers 1

executeDefaultMethod · 0.95

Calls 3

cmdInfoPeekMethod · 0.95
cmdFirstKeyPosWithInfoFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected