mirror of
https://github.com/redis/go-redis.git
synced 2025-09-05 20:24:00 +03:00
This commit includes all the work on hitless upgrades with the addition of: - Pubsub Pool - Examples - Refactor of push - Refactor of pool (using atomics for most things) - Introducing of hooks in pool
18 lines
227 B
Go
18 lines
227 B
Go
package util
|
|
|
|
// Max returns the maximum of two integers
|
|
func Max(a, b int) int {
|
|
if a > b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|
|
|
|
// Min returns the minimum of two integers
|
|
func Min(a, b int) int {
|
|
if a < b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|