MCPcopy
hub / github.com/redis/go-redis / ApplyDefaults

Method ApplyDefaults

maintnotifications/config.go:208–210  ·  view source on GitHub ↗

ApplyDefaults applies default values to any zero-value fields in the configuration. This ensures that partially configured structs get sensible defaults for missing fields.

()

Source from the content-addressed store, hash-verified

206// ApplyDefaults applies default values to any zero-value fields in the configuration.
207// This ensures that partially configured structs get sensible defaults for missing fields.
208func (c *Config) ApplyDefaults() *Config {
209 return c.ApplyDefaultsWithPoolSize(0)
210}
211
212// ApplyDefaultsWithPoolSize applies default values to any zero-value fields in the configuration,
213// using the provided pool size to calculate worker defaults.

Callers 2

TestConfigFunction · 0.80

Calls 1

Tested by 2

TestConfigFunction · 0.64