Skip to content

Commit b9a2e76

Browse files
committed
fixed indentation issues
Signed-off-by: Edward Liang <edward.liang@improving.com>
1 parent c1cccbb commit b9a2e76

File tree

1 file changed

+89
-89
lines changed

1 file changed

+89
-89
lines changed

go/api/base_client.go

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ func toCStrings(args []string) ([]C.uintptr_t, []C.ulong) {
194194
//
195195
// For example:
196196
//
197-
// result, err := client.Set("key", "value")
198-
// result: "OK"
197+
// result, err := client.Set("key", "value")
198+
// result: "OK"
199199
//
200200
// [valkey.io]: https://valkey.io/commands/set/
201201
func (client *baseClient) Set(key string, value string) (string, error) {
@@ -377,8 +377,8 @@ func (client *baseClient) GetExWithOptions(key string, options *GetExOptions) (R
377377
//
378378
// For example:
379379
//
380-
// result, err := client.MSet(map[string]string{"key1": "value1", "key2": "value2"})
381-
// result: "OK"
380+
// result, err := client.MSet(map[string]string{"key1": "value1", "key2": "value2"})
381+
// result: "OK"
382382
//
383383
// [valkey.io]: https://valkey.io/commands/mset/
384384
func (client *baseClient) MSet(keyValueMap map[string]string) (string, error) {
@@ -451,13 +451,13 @@ func (client *baseClient) MSetNX(keyValueMap map[string]string) (bool, error) {
451451
//
452452
// For example:
453453
//
454-
// key1: value1, key2: value2
455-
// result, err := client.MGet([]string{"key1", "key2", "key3"})
456-
// result : {
457-
// api.CreateStringResult("value1),
458-
// api.CreateStringResult("value2"),
459-
// api.CreateNilStringResult()
460-
// }
454+
// key1: value1, key2: value2
455+
// result, err := client.MGet([]string{"key1", "key2", "key3"})
456+
// result : {
457+
// api.CreateStringResult("value1),
458+
// api.CreateStringResult("value2"),
459+
// api.CreateNilStringResult()
460+
// }
461461
//
462462
// [valkey.io]: https://valkey.io/commands/mget/
463463
func (client *baseClient) MGet(keys []string) ([]Result[string], error) {
@@ -1173,9 +1173,9 @@ func (client *baseClient) HStrLen(key string, field string) (int64, error) {
11731173
//
11741174
// Example:
11751175
//
1176-
// _, err := client.HSet("key", map[string]string{"field": "10"})
1177-
// hincrByResult, err := client.HIncrBy("key", "field", 1)
1178-
// // hincrByResult: 11
1176+
// _, err := client.HSet("key", map[string]string{"field": "10"})
1177+
// hincrByResult, err := client.HIncrBy("key", "field", 1)
1178+
// // hincrByResult: 11
11791179
//
11801180
// [valkey.io]: https://valkey.io/commands/hincrby/
11811181
func (client *baseClient) HIncrBy(key string, field string, increment int64) (int64, error) {
@@ -1205,9 +1205,9 @@ func (client *baseClient) HIncrBy(key string, field string, increment int64) (in
12051205
//
12061206
// Example:
12071207
//
1208-
// _, err := client.HSet("key", map[string]string{"field": "10"})
1209-
// hincrByFloatResult, err := client.HIncrByFloat("key", "field", 1.5)
1210-
// // hincrByFloatResult: 11.5
1208+
// _, err := client.HSet("key", map[string]string{"field": "10"})
1209+
// hincrByFloatResult, err := client.HIncrByFloat("key", "field", 1.5)
1210+
// // hincrByFloatResult: 11.5
12111211
//
12121212
// [valkey.io]: https://valkey.io/commands/hincrbyfloat/
12131213
func (client *baseClient) HIncrByFloat(key string, field string, increment float64) (float64, error) {
@@ -1260,9 +1260,9 @@ func (client *baseClient) HScan(key string, cursor string) (string, []string, er
12601260
//
12611261
// Parameters:
12621262
//
1263-
// key - The key of the hash.
1264-
// cursor - The cursor that points to the next iteration of results. A value of "0" indicates the start of the search.
1265-
// options - The [api.HashScanOptions].
1263+
// key - The key of the hash.
1264+
// cursor - The cursor that points to the next iteration of results. A value of "0" indicates the start of the search.
1265+
// options - The [api.HashScanOptions].
12661266
//
12671267
// Return value:
12681268
//
@@ -1274,13 +1274,13 @@ func (client *baseClient) HScan(key string, cursor string) (string, []string, er
12741274
//
12751275
// Example:
12761276
//
1277-
// // Assume key contains a hash {{"a": "1"}, {"b", "2"}}
1278-
// opts := options.NewHashScanOptionsBuilder().SetMatch("a")
1279-
// resCursor, resCollection, err = client.HScan(key, initialCursor, opts)
1280-
// // resCursor = {0 false}
1281-
// // resCollection = [{a false} {1 false}]
1282-
// // The resCollection only contains the hash map entry that matches with the match option provided with the command
1283-
// // input.
1277+
// // Assume key contains a hash {{"a": "1"}, {"b", "2"}}
1278+
// opts := options.NewHashScanOptionsBuilder().SetMatch("a")
1279+
// resCursor, resCollection, err = client.HScan(key, initialCursor, opts)
1280+
// // resCursor = {0 false}
1281+
// // resCollection = [{a false} {1 false}]
1282+
// // The resCollection only contains the hash map entry that matches with the match option provided with the command
1283+
// // input.
12841284
//
12851285
// [valkey.io]: https://valkey.io/commands/hscan/
12861286
func (client *baseClient) HScanWithOptions(
@@ -1628,8 +1628,8 @@ func (client *baseClient) SRem(key string, members []string) (int64, error) {
16281628
//
16291629
// Parameters:
16301630
//
1631-
// destination - The key of the destination set.
1632-
// keys - The keys from which to retrieve the set members.
1631+
// destination - The key of the destination set.
1632+
// keys - The keys from which to retrieve the set members.
16331633
//
16341634
// Return value:
16351635
//
@@ -1844,8 +1844,8 @@ func (client *baseClient) SInter(keys []string) (map[string]struct{}, error) {
18441844
//
18451845
// Parameters:
18461846
//
1847-
// destination - The key of the destination set.
1848-
// keys - The keys from which to retrieve the set members.
1847+
// destination - The key of the destination set.
1848+
// keys - The keys from which to retrieve the set members.
18491849
//
18501850
// Return value:
18511851
//
@@ -2021,14 +2021,14 @@ func (client *baseClient) SPop(key string) (Result[string], error) {
20212021
//
20222022
// Example:
20232023
//
2024-
// client.SAdd("myKey", []string{"one", "two"})
2025-
// value1, err := client.SMIsMember("myKey", []string{"two", "three"})
2026-
// // value1[0].Value(): true
2027-
// // value1[1].Value(): false
2028-
// // err: nil
2029-
// value2, err := client.SPop("nonExistingKey", []string{"one"})
2030-
// // value2[0].Value(): false
2031-
// // err: nil
2024+
// client.SAdd("myKey", []string{"one", "two"})
2025+
// value1, err := client.SMIsMember("myKey", []string{"two", "three"})
2026+
// // value1[0].Value(): true
2027+
// // value1[1].Value(): false
2028+
// // err: nil
2029+
// value2, err := client.SPop("nonExistingKey", []string{"one"})
2030+
// // value2[0].Value(): false
2031+
// // err: nil
20322032
//
20332033
// [valkey.io]: https://valkey.io/commands/smismember/
20342034
func (client *baseClient) SMIsMember(key string, members []string) ([]bool, error) {
@@ -2207,8 +2207,8 @@ func (client *baseClient) SScanWithOptions(
22072207
//
22082208
// Example:
22092209
//
2210-
// moved := SMove("set1", "set2", "element")
2211-
// fmt.Println(moved.Value()) // Output: true
2210+
// moved := SMove("set1", "set2", "element")
2211+
// fmt.Println(moved.Value()) // Output: true
22122212
//
22132213
// [valkey.io]: https://valkey.io/commands/smove/
22142214
func (client *baseClient) SMove(source string, destination string, member string) (bool, error) {
@@ -3563,12 +3563,12 @@ func (client *baseClient) PfCount(keys []string) (int64, error) {
35633563
//
35643564
// Note:
35653565
//
3566-
// In cluster mode, if keys in keys map to different hash slots, the command
3567-
// will be split across these slots and executed separately for each. This means the command
3568-
// is atomic only at the slot level. If one or more slot-specific requests fail, the entire
3569-
// call will return the first encountered error, even though some requests may have succeeded
3570-
// while others did not. If this behavior impacts your application logic, consider splitting
3571-
// the request into sub-requests per slot to ensure atomicity.
3566+
// In cluster mode, if keys in keys map to different hash slots, the command
3567+
// will be split across these slots and executed separately for each. This means the command
3568+
// is atomic only at the slot level. If one or more slot-specific requests fail, the entire
3569+
// call will return the first encountered error, even though some requests may have succeeded
3570+
// while others did not. If this behavior impacts your application logic, consider splitting
3571+
// the request into sub-requests per slot to ensure atomicity.
35723572
//
35733573
// Parameters:
35743574
//
@@ -3628,12 +3628,12 @@ func (client *baseClient) Type(key string) (string, error) {
36283628
//
36293629
// Note:
36303630
//
3631-
// In cluster mode, if keys in keys map to different hash slots, the command
3632-
// will be split across these slots and executed separately for each. This means the command
3633-
// is atomic only at the slot level. If one or more slot-specific requests fail, the entire
3634-
// call will return the first encountered error, even though some requests may have succeeded
3635-
// while others did not. If this behavior impacts your application logic, consider splitting
3636-
// the request into sub-requests per slot to ensure atomicity.
3631+
// In cluster mode, if keys in keys map to different hash slots, the command
3632+
// will be split across these slots and executed separately for each. This means the command
3633+
// is atomic only at the slot level. If one or more slot-specific requests fail, the entire
3634+
// call will return the first encountered error, even though some requests may have succeeded
3635+
// while others did not. If this behavior impacts your application logic, consider splitting
3636+
// the request into sub-requests per slot to ensure atomicity.
36373637
//
36383638
// Parameters:
36393639
//
@@ -3679,11 +3679,11 @@ func (client *baseClient) Touch(keys []string) (int64, error) {
36793679
//
36803680
// Example:
36813681
//
3682-
// result, err := client.Rename([]string{"key", "newkey"})
3683-
// if err != nil {
3684-
// // handle error
3685-
// }
3686-
// fmt.Println(result) // Output: OK
3682+
// result, err := client.Rename([]string{"key", "newkey"})
3683+
// if err != nil {
3684+
// // handle error
3685+
// }
3686+
// fmt.Println(result) // Output: OK
36873687
//
36883688
// [valkey.io]: https://valkey.io/commands/rename/
36893689
func (client *baseClient) Rename(key string, newKey string) (string, error) {
@@ -3711,11 +3711,11 @@ func (client *baseClient) Rename(key string, newKey string) (string, error) {
37113711
//
37123712
// Example:
37133713
//
3714-
// result, err := client.Renamenx([]string{"key", "newkey"})
3715-
// if err != nil {
3716-
// // handle error
3717-
// }
3718-
// fmt.Println(result) // Output: true
3714+
// result, err := client.Renamenx([]string{"key", "newkey"})
3715+
// if err != nil {
3716+
// // handle error
3717+
// }
3718+
// fmt.Println(result) // Output: true
37193719
//
37203720
// [valkey.io]: https://valkey.io/commands/renamenx/
37213721
func (client *baseClient) Renamenx(key string, newKey string) (bool, error) {
@@ -4524,11 +4524,11 @@ func (client *baseClient) ZRangeWithScores(
45244524
//
45254525
// Example:
45264526
//
4527-
// result, err := client.Persist([]string{"key"})
4528-
// if err != nil {
4529-
// // handle error
4530-
// }
4531-
// fmt.Println(result) // Output: true
4527+
// result, err := client.Persist([]string{"key"})
4528+
// if err != nil {
4529+
// // handle error
4530+
// }
4531+
// fmt.Println(result) // Output: true
45324532
//
45334533
// [valkey.io]: https://valkey.io/commands/persist/
45344534
func (client *baseClient) Persist(key string) (bool, error) {
@@ -4560,9 +4560,9 @@ func (client *baseClient) Persist(key string) (bool, error) {
45604560
// membersScores := map[string]float64{"one": 1.0, "two": 2.0, "three": 3.0 }
45614561
// zAddResult, err := client.ZAdd(key1, membersScores)
45624562
// zCountRange := options.NewZCountRangeBuilder(
4563-
// options.NewInfiniteScoreBoundary(options.NegativeInfinity),
4564-
// options.NewInfiniteScoreBoundary(options.PositiveInfinity),
4565-
// )
4563+
// options.NewInfiniteScoreBoundary(options.NegativeInfinity),
4564+
// options.NewInfiniteScoreBoundary(options.PositiveInfinity),
4565+
// )
45664566
// zCountResult, err := client.ZCount(key1, zCountRange)
45674567
// if err != nil {
45684568
// // Handle err
@@ -5370,9 +5370,9 @@ func (client *baseClient) XGroupCreateWithOptions(
53705370
//
53715371
// Parameters:
53725372
//
5373-
// key - The key to create.
5374-
// ttl - The expiry time (in milliseconds). If 0, the key will persist.
5375-
// value - The serialized value to deserialize and assign to key.
5373+
// key - The key to create.
5374+
// ttl - The expiry time (in milliseconds). If 0, the key will persist.
5375+
// value - The serialized value to deserialize and assign to key.
53765376
//
53775377
// Return value:
53785378
//
@@ -5396,10 +5396,10 @@ func (client *baseClient) Restore(key string, ttl int64, value string) (Result[s
53965396
//
53975397
// Parameters:
53985398
//
5399-
// key - The key to create.
5400-
// ttl - The expiry time (in milliseconds). If 0, the key will persist.
5401-
// value - The serialized value to deserialize and assign to key.
5402-
// restoreOptions - Set restore options with replace and absolute TTL modifiers, object idletime and frequency
5399+
// key - The key to create.
5400+
// ttl - The expiry time (in milliseconds). If 0, the key will persist.
5401+
// value - The serialized value to deserialize and assign to key.
5402+
// restoreOptions - Set restore options with replace and absolute TTL modifiers, object idletime and frequency
54035403
//
54045404
// Return value:
54055405
//
@@ -5445,11 +5445,11 @@ func (client *baseClient) RestoreWithOptions(key string, ttl int64,
54455445
//
54465446
// Example:
54475447
//
5448-
// result, err := client.Dump([]string{"key"})
5449-
// if err != nil {
5450-
// // handle error
5451-
// }
5452-
// fmt.Println(result.Value()) // Output: (Serialized Value)
5448+
// result, err := client.Dump([]string{"key"})
5449+
// if err != nil {
5450+
// // handle error
5451+
// }
5452+
// fmt.Println(result.Value()) // Output: (Serialized Value)
54535453
//
54545454
// [valkey.io]: https://valkey.io/commands/dump/
54555455
func (client *baseClient) Dump(key string) (Result[string], error) {
@@ -5505,11 +5505,11 @@ func (client *baseClient) ObjectEncoding(key string) (Result[string], error) {
55055505
//
55065506
// For example:
55075507
//
5508-
// result, err := client.Echo("Hello World")
5509-
// if err != nil {
5510-
// // handle error
5511-
// }
5512-
// fmt.Println(result.Value()) // Output: Hello World
5508+
// result, err := client.Echo("Hello World")
5509+
// if err != nil {
5510+
// // handle error
5511+
// }
5512+
// fmt.Println(result.Value()) // Output: Hello World
55135513
//
55145514
// [valkey.io]: https://valkey.io/commands/echo/
55155515
func (client *baseClient) Echo(message string) (Result[string], error) {
@@ -5930,7 +5930,7 @@ func (client *baseClient) SortStoreWithOptions(
59305930
//
59315931
// Example:
59325932
//
5933-
// //Creates the consumer "myconsumer" in consumer group "mygroup"
5933+
// // Creates the consumer "myconsumer" in consumer group "mygroup"
59345934
// success, err := client.xgroupCreateConsumer("mystream", "mygroup", "myconsumer")
59355935
// if err == nil && success {
59365936
// fmt.Println("Consumer created")

0 commit comments

Comments
 (0)