This commit is contained in:
Junegunn Choi
2015-08-02 23:54:53 +09:00
parent 7833fa7396
commit ae87f6548a
3 changed files with 19 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ func Max(first int, items ...int) int {
return max
}
// Max32 returns the smallest 32-bit integer
// Min32 returns the smallest 32-bit integer
func Min32(first int32, second int32) int32 {
if first <= second {
return first
@@ -70,10 +70,6 @@ func DurWithin(
return val
}
func Between(val int, min int, max int) bool {
return val >= min && val <= max
}
// IsTty returns true is stdin is a terminal
func IsTty() bool {
return int(C.isatty(C.int(os.Stdin.Fd()))) != 0