Files
go-easy-utils/mathUtil/max_example_test.go
jeffery f97913a2bc Feature/math util (#22)
Development supports the math package
2023-04-12 11:10:07 +08:00

16 lines
212 B
Go

package mathUtil
import "fmt"
func ExampleMax() {
res1 := Max([]int{5, 8, 9, 2, 1})
res2 := Max([]float64{3.14, 2.0, -0.1, 2.2, 100.11})
fmt.Println(res1)
fmt.Println(res2)
// Output:
// 9
// 100.11
}