Normalize Rueidis README indentation

This commit is contained in:
Juan Calderon-Perez
2025-10-13 21:33:50 -04:00
parent 50d99b709c
commit 9951538c9e

View File

@@ -98,8 +98,8 @@ store = rueidis.New(rueidis.Config{
### Config ### Config
```go ```go
type Config struct { type Config struct {
// Server username // Server username
// //
// Optional. Default is "" // Optional. Default is ""
Username string Username string
@@ -167,22 +167,22 @@ type Config struct {
// DisableRetry disables retrying read-only commands under network errors // DisableRetry disables retrying read-only commands under network errors
// //
// Optional. The default is False // Optional. The default is False
DisableRetry bool DisableRetry bool
// DisableCache falls back Client.DoCache/Client.DoMultiCache to Client.Do/Client.DoMulti // DisableCache falls back Client.DoCache/Client.DoMultiCache to Client.Do/Client.DoMulti
// //
// Optional. The default is false // Optional. The default is false
DisableCache bool DisableCache bool
// AlwaysPipelining makes rueidis.Client always pipeline redis commands even if they are not issued concurrently. // AlwaysPipelining makes rueidis.Client always pipeline redis commands even if they are not issued concurrently.
// //
// Optional. The default is true // Optional. The default is true
AlwaysPipelining bool AlwaysPipelining bool
// Reset clears any existing keys in existing Collection // Reset clears any existing keys in existing Collection
// //
// Optional. Default is false // Optional. Default is false
Reset bool Reset bool
// DisableStartupCheck skips the initial connection validation during New. // DisableStartupCheck skips the initial connection validation during New.
// When true and client creation fails, New returns a Storage whose // When true and client creation fails, New returns a Storage whose
@@ -191,33 +191,33 @@ type Config struct {
// Optional. Default is false // Optional. Default is false
DisableStartupCheck bool DisableStartupCheck bool
// CacheTTL TTL // CacheTTL TTL
// //
// Optional. Default is time.Minute // Optional. Default is time.Minute
CacheTTL time.Duration CacheTTL time.Duration
} }
``` ```
### Default Config ### Default Config
```go ```go
var ConfigDefault = Config{ var ConfigDefault = Config{
Username: "", Username: "",
Password: "", Password: "",
ClientName: "", ClientName: "",
SelectDB: 0, SelectDB: 0,
InitAddress: []string{"127.0.0.1:6379"}, InitAddress: []string{"127.0.0.1:6379"},
TLSConfig: nil, TLSConfig: nil,
CacheSizeEachConn: rueidis.DefaultCacheBytes, CacheSizeEachConn: rueidis.DefaultCacheBytes,
RingScaleEachConn: rueidis.DefaultRingScale, RingScaleEachConn: rueidis.DefaultRingScale,
ReadBufferEachConn: rueidis.DefaultReadBuffer, ReadBufferEachConn: rueidis.DefaultReadBuffer,
WriteBufferEachConn: rueidis.DefaultWriteBuffer, WriteBufferEachConn: rueidis.DefaultWriteBuffer,
BlockingPoolSize: rueidis.DefaultPoolSize, BlockingPoolSize: rueidis.DefaultPoolSize,
PipelineMultiplex: 2, PipelineMultiplex: 2,
DisableRetry: false, DisableRetry: false,
DisableCache: false, DisableCache: false,
AlwaysPipelining: true, AlwaysPipelining: true,
Reset: false, Reset: false,
DisableStartupCheck: false, DisableStartupCheck: false,
CacheTTL: time.Minute, CacheTTL: time.Minute,
} }
``` ```