An open API service indexing awesome lists of open source software.

https://github.com/gonejack/gf

Golang fallback
https://github.com/gonejack/gf

Last synced: about 1 month ago
JSON representation

Golang fallback

Awesome Lists containing this project

README

          

# gf
golang fallback

```golang
func EmptyFallback(s, def string) string {
if s == "" {
return def
}
return s
}

func ZeroFallback(i, def int) int {
if i == 0 {
return def
}
return i
}

func Max(i, max int) int {
if i > max {
return max
}
return i
}

func Min(i, min int) int {
if i < min {
return min
}
return i
}

```