Go math
pkg provides Max
Min
only for float64
, this lib adds on for other types.
Why does Go not have feature X?
go get github.com/andy2046/maths
func main() {
iSlice := []int{1, 2, 3}
i := IntVar.Max(iSlice...) // 3
i = IntVar.Min(iSlice...) // 1
}