File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ package example_commands_test
55import (
66 "context"
77 "fmt"
8+ "sort"
89
910 "github.com/redis/go-redis/v9"
1011)
@@ -244,8 +245,12 @@ func ExampleClient_vectorset() {
244245 panic (err )
245246 }
246247
248+ sort .Slice (res23 , func (i , j int ) bool {
249+ return res23 [i ].Name < res23 [j ].Name
250+ })
251+
247252 fmt .Println (res23 )
248- // >>> [{pt:A 1} {pt:E 0.8535534143447876 } {pt:D 0.5} {pt:C 0.5 }]
253+ // >>> [{pt:A 1} {pt:C 0.5 } {pt:D 0.5} {pt:E 0.8535534143447876 }]
249254 // STEP_END
250255
251256 // STEP_START vsim_filter
@@ -365,7 +370,7 @@ func ExampleClient_vectorset() {
365370 // true
366371 // 5
367372 // [pt:E pt:A pt:D pt:C pt:B]
368- // [{pt:A 1} {pt:E 0.8535534143447876 } {pt:D 0.5} {pt:C 0.5 }]
373+ // [{pt:A 1} {pt:C 0.5 } {pt:D 0.5} {pt:E 0.8535534143447876 }]
369374 // true
370375 // true
371376 // true
You can’t perform that action at this time.
0 commit comments