Skip to content

Commit

Permalink
rename getCommand to GetCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
diiyw committed Nov 20, 2024
1 parent 0626ba2 commit 6a77f65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func execCommand(conn *redis.Conn, fn func()) {
conn.WriteString("QUEUED")
}

func getCommand(name string) func(n *Nodis, conn *redis.Conn, cmd redis.Command) {
func GetCommand(name string) func(n *Nodis, conn *redis.Conn, cmd redis.Command) {
switch name {
case "CLIENT":
return client
Expand Down
2 changes: 1 addition & 1 deletion nodis.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (n *Nodis) Serve(addr string) error {
os.Exit(0)
}()
return redis.Serve(addr, func(conn *redis.Conn, cmd redis.Command) {
c := getCommand(cmd.Name)
c := GetCommand(cmd.Name)
c(n, conn, cmd)
if conn.HasError() && conn.State != 0 {
conn.State |= redis.MultiError
Expand Down

0 comments on commit 6a77f65

Please sign in to comment.