mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-06 07:26:53 +08:00
15
mathUtil/max_example_test.go
Normal file
15
mathUtil/max_example_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user