diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-09 19:00:45 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-09 19:00:45 +0100 |
commit | 99d8955ab3b5e24552d1f2b621744d07013f58ac (patch) | |
tree | 5820b5b594aeea4d4bb366055efef62046221119 /read.go | |
parent | 1a20a64eff34336789c0e3b41db1de727e3fe998 (diff) | |
download | bottin-99d8955ab3b5e24552d1f2b621744d07013f58ac.tar.gz bottin-99d8955ab3b5e24552d1f2b621744d07013f58ac.zip |
Refactor & add case normalization logic to putAttributes
Diffstat (limited to 'read.go')
-rw-r--r-- | read.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -17,11 +17,14 @@ func (server *Server) getAttribute(dn string, attr string) ([]string, error) { return nil, err } + // List all attributes of the object, this is needed because the attribute we are + // looking for can exist with different cases than the one specified here pairs, _, err := server.kv.List(path+"/attribute=", &server.readOpts) if err != nil { return nil, err } + // Collect values for the attribute, case-insensitively values := []string{} for _, pair := range pairs { if strings.EqualFold(pair.Key, path+"/attribute="+attr) { |