1
0
Fork 0
forked from External/ergo

improve maintainability and license compliance

0. Maximum parity with upstream code
1. Added Apache-required modification notices
2. Added Apache license
This commit is contained in:
Shivaram Lingamneni 2020-02-11 16:09:43 -05:00
parent c13597f807
commit 0c2d8adeac
7 changed files with 551 additions and 250 deletions

View file

@ -1,5 +1,5 @@
// Copyright Grafana Labs and contributors
// and released under the Apache 2.0 license
// Copyright 2014-2018 Grafana Labs
// Released under the Apache 2.0 license
package ldap
@ -49,3 +49,12 @@ func getAttribute(name string, entry *ldap.Entry) string {
}
return ""
}
func appendIfNotEmpty(slice []string, values ...string) []string {
for _, v := range values {
if v != "" {
slice = append(slice, v)
}
}
return slice
}