From b8388acbff6a43762dbc6215d521b0b6f121f4a7 Mon Sep 17 00:00:00 2001 From: Mohamed Al Ashaal Date: Sat, 17 Sep 2022 21:04:32 +0200 Subject: [PATCH] renamed newChannel variable to channelEncoded --- internals/datastore/engines/postgresql/postgresql.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internals/datastore/engines/postgresql/postgresql.go b/internals/datastore/engines/postgresql/postgresql.go index be5729d..001915f 100644 --- a/internals/datastore/engines/postgresql/postgresql.go +++ b/internals/datastore/engines/postgresql/postgresql.go @@ -272,8 +272,8 @@ func (e *Engine) Close() error { // Publish submits the payload to the specified channel func (e *Engine) Publish(channel []byte, payload []byte) error { - newChannel := fmt.Sprintf("%x", md5.Sum(channel)) - if _, err := e.conn.Exec(context.Background(), "SELECT pg_notify($1, $2)", newChannel, payload); err != nil { + channelEncoded := fmt.Sprintf("%x", md5.Sum(channel)) + if _, err := e.conn.Exec(context.Background(), "SELECT pg_notify($1, $2)", channelEncoded, payload); err != nil { return err } @@ -291,8 +291,8 @@ func (e *Engine) Subscribe(channel []byte, cb func([]byte) error) error { return err } - newChannel := fmt.Sprintf("\"%x\"", md5.Sum(channel)) - if _, err := conn.Exec(context.Background(), "LISTEN "+newChannel); err != nil { + channelEncoded := fmt.Sprintf("\"%x\"", md5.Sum(channel)) + if _, err := conn.Exec(context.Background(), "LISTEN "+channelEncoded); err != nil { return fmt.Errorf("database::listen::err %s", err.Error()) }