Update dependencies for 5.6 (#24)

This commit is contained in:
Hanzei 2018-12-17 08:28:01 +01:00 committed by GitHub
parent 76ba0b57a7
commit 415e8b5f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 3499 additions and 1746 deletions

View file

@ -564,3 +564,26 @@ func IsDomainName(s string) bool {
return ok
}
func RemoveDuplicateStrings(in []string) []string {
out := []string{}
seen := make(map[string]bool, len(in))
for _, item := range in {
if !seen[item] {
out = append(out, item)
seen[item] = true
}
}
return out
}
func GetPreferredTimezone(timezone StringMap) string {
if timezone["useAutomaticTimezone"] == "true" {
return timezone["automaticTimezone"]
}
return timezone["manualTimezone"]
}