1
0
Fork 0

Remove github.com/satori/go.uuid.

This commit is contained in:
Ludovic Fernandez 2019-04-05 12:44:03 +02:00 committed by Traefiker Bot
parent e1d097ea20
commit 2e19e45aa4
25 changed files with 1027 additions and 365 deletions

View file

@ -49,7 +49,6 @@ func empty(given interface{}) bool {
case reflect.Struct:
return false
}
return true
}
// coalesce returns the first non-empty value.
@ -73,3 +72,12 @@ func toPrettyJson(v interface{}) string {
output, _ := json.MarshalIndent(v, "", " ")
return string(output)
}
// ternary returns the first value if the last value is true, otherwise returns the second value.
func ternary(vt interface{}, vf interface{}, v bool) interface{} {
if v {
return vt
}
return vf
}