Rewrite fzf in Go

This commit is contained in:
Junegunn Choi
2015-01-02 04:49:30 +09:00
parent 7ba93d9f83
commit f3177305d5
32 changed files with 3466 additions and 49 deletions

21
src/util.go Normal file
View 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
}