Skip to content

Commit

Permalink
Go: XTrim, XLen - documentation updated
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Kumar <[email protected]>
  • Loading branch information
prateek-kumar-improving committed Jan 10, 2025
1 parent 5082000 commit 1f90184
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/api/stream_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ type StreamCommands interface {
//
// For example:
// xAddResult, err = client.XAddWithOptions(
// key1,
// "key1",
// [][]string{{field1, "foo4"}, {field2, "bar4"}},
// options.NewXAddOptions().SetTrimOptions(
// options.NewXTrimOptionsWithMinId(id).SetExactTrimming(),
// ),
// )
// xTrimResult, err := client.XTrim(
// key1,
// "key1",
// options.NewXTrimOptionsWithMaxLen(1).SetExactTrimming(),
// )
// fmt.Println(xTrimResult.Value()) // Output: 1
Expand All @@ -90,13 +90,13 @@ type StreamCommands interface {
//
// For example:
// xAddResult, err = client.XAddWithOptions(
// key1,
// "key1",
// [][]string{{field1, "foo4"}, {field2, "bar4"}},
// options.NewXAddOptions().SetTrimOptions(
// options.NewXTrimOptionsWithMinId(id).SetExactTrimming(),
// ),
// )
// xLenResult, err = client.XLen(key1)
// xLenResult, err = client.XLen("key1")
// fmt.Println(xLenResult.Value()) // Output: 2
//
// [valkey.io]: https://valkey.io/commands/xlen/
Expand Down

0 comments on commit 1f90184

Please sign in to comment.