Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/util/math/math.go

41 lines
561 B

package math
// Max returns the maximum of two ints
func Max(a, b int) int {
if a > b {
return a
}
return b
}
// Min returns the minimum of two ints
func Min(a, b int) int {
if a < b {
return a
}
return b
}
// Max64 returns the maximum of two int64s
func Max64(a, b int64) int64 {
if a > b {
return a
}
return b
}
// Min64 returns the minimum of two int64s
func Min64(a, b int64) int64 {
if a < b {
return a
}
return b
}
// MinUint32 return the min of a and b.
func MinUint32(a, b uint32) uint32 {
if a < b {
return a
}
return b
}