1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-10 07:11:50 +03:00
Files
go-redis/internal/util/math.go
Nedyalko Dyakov cb3af0800e [CAE-1072] Hitless Upgrades (#3447)
* feat(hitless): Introduce handlers for hitless upgrades

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


---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-03 14:49:16 +03:00

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
}