Skip to content

Commit afba056

Browse files
authored
Merge pull request #65 from Icinga/drop-utils-maxint
utils: Drop MaxInt
2 parents 20c0537 + 4bb0ac7 commit afba056

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

redis/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func NewClientFromConfig(c *Config, logger *logging.Logger) (*Client, error) {
7373

7474
client := redis.NewClient(options)
7575
options = client.Options()
76-
options.PoolSize = utils.MaxInt(32, options.PoolSize)
76+
options.PoolSize = max(32, options.PoolSize)
7777
options.MaxRetries = options.PoolSize + 1 // https://github.com/go-redis/redis/issues/1737
7878

7979
return NewClient(redis.NewClient(options), logger, &c.Options), nil

utils/utils.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,6 @@ func AppName() string {
129129
return filepath.Base(exe)
130130
}
131131

132-
// MaxInt returns the larger of the given integers.
133-
func MaxInt(x, y int) int {
134-
if x > y {
135-
return x
136-
}
137-
138-
return y
139-
}
140-
141132
// IsUnixAddr indicates whether the given host string represents a Unix socket address.
142133
//
143134
// A host string that begins with a forward slash ('/') is considered Unix socket address.

0 commit comments

Comments
 (0)