mirror of
https://github.com/status-im/consul.git
synced 2025-02-05 10:24:46 +00:00
9fb64ab114
Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean. Fixes: #1583 && #1481
16 lines
146 B
Go
16 lines
146 B
Go
package lib
|
|
|
|
func MaxInt(a, b int) int {
|
|
if a > b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|
|
|
|
func MinInt(a, b int) int {
|
|
if a > b {
|
|
return b
|
|
}
|
|
return a
|
|
}
|