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:
parent
c13597f807
commit
0c2d8adeac
7 changed files with 551 additions and 250 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue