Added options and tests for exporters.

This commit is contained in:
Musab Gültekin
2019-06-27 16:54:09 +03:00
parent d20ea47390
commit 8fe194bd10
5 changed files with 55 additions and 6 deletions

View File

@ -8,6 +8,14 @@ func PreferFirst(first string, second string) string {
return second
}
// PreferFirstRune returns first non-empty rune
func PreferFirstRune(first rune, second rune) rune {
if first != 0 {
return first
}
return second
}
// Contains checks whether []string Contains string
func Contains(s []string, e string) bool {
for _, a := range s {