Added options and tests for exporters.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user