mirror of
https://github.com/junegunn/fzf.git
synced 2025-12-22 04:01:29 +08:00
Rewrite fzf in Go
This commit is contained in:
21
src/util.go
Normal file
21
src/util.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package fzf
|
||||
|
||||
func Max(first int, items ...int) int {
|
||||
max := first
|
||||
for _, item := range items {
|
||||
if item > max {
|
||||
max = item
|
||||
}
|
||||
}
|
||||
return max
|
||||
}
|
||||
|
||||
func Min(first int, items ...int) int {
|
||||
min := first
|
||||
for _, item := range items {
|
||||
if item < min {
|
||||
min = item
|
||||
}
|
||||
}
|
||||
return min
|
||||
}
|
||||
Reference in New Issue
Block a user