Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
* Core: Refactor socket listener to use a runtime that lives for the application lifetime [#3842](https://github.com/valkey-io/valkey-glide/pull/3842)
* Go: Add Function Dump & Restore ([#3721](https://github.com/valkey-io/valkey-glide/pull/3721))
* Python: Fix restore command([#3853](https://github.com/valkey-io/valkey-glide/pull/3853))
* Go: Remove redundant implementations of echo([#3859](https://github.com/valkey-io/valkey-glide/pull/3859))

#### Breaking Changes

Expand Down
2 changes: 1 addition & 1 deletion go/api/base_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5021,7 +5021,7 @@ func (client *baseClient) ObjectEncoding(key string) (Result[string], error) {
// The provided message
//
// [valkey.io]: https://valkey.io/commands/echo/
func (client *baseClient) Echo(message string) (Result[string], error) {
func (client *baseClient) echo(message string) (Result[string], error) {
result, err := client.executeCommand(C.Echo, []string{message})
if err != nil {
return CreateNilStringResult(), err
Expand Down
9 changes: 2 additions & 7 deletions go/api/glide_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func (client *GlideClient) DBSize() (int64, error) {
}

// Echo the provided message back.
// The command will be routed a random node.
//
// Parameters:
//
Expand All @@ -228,12 +227,8 @@ func (client *GlideClient) DBSize() (int64, error) {
// The provided message
//
// [valkey.io]: https://valkey.io/commands/echo/
func (client *GlideClient) Echo(message string) (Result[string], error) {
result, err := client.executeCommand(C.Echo, []string{message})
if err != nil {
return CreateNilStringResult(), err
}
return handleStringOrNilResponse(result)
func (client *baseClient) Echo(message string) (Result[string], error) {
return client.echo(message)
}

// Pings the server.
Expand Down
16 changes: 16 additions & 0 deletions go/api/glide_cluster_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,22 @@ func (client *GlideClusterClient) FlushDBWithOptions(flushOptions options.FlushC
return handleOkResponse(result)
}

// Echo the provided message back.
// The command will be routed to a random node.
//
// Parameters:
//
// message - The provided message.
//
// Return value:
//
// The provided message
//
// [valkey.io]: https://valkey.io/commands/echo/
func (client *GlideClient) Echo(message string) (Result[string], error) {
return client.echo(message)
}

// Echo the provided message back.
//
// Parameters:
Expand Down
Loading