15 lines
155 B
Go
15 lines
155 B
Go
|
package util
|
||
|
|
||
|
func MaxI(x ...int) int {
|
||
|
if len(x) == 0 {
|
||
|
return 0
|
||
|
}
|
||
|
tmp := x[0]
|
||
|
for _, v := range x {
|
||
|
if tmp < v {
|
||
|
tmp = v
|
||
|
}
|
||
|
}
|
||
|
return tmp
|
||
|
}
|