vendor and go mod. add ldap file

This commit is contained in:
Xavier Henner
2019-07-09 09:53:46 +02:00
parent 29efc7be3f
commit 55ae63dc1d
61 changed files with 4696 additions and 2974 deletions

28
vendor/gopkg.in/ldap.v2/atomic_value_go13.go generated vendored Normal file
View File

@@ -0,0 +1,28 @@
// +build !go1.4
package ldap
import (
"sync"
)
// This is a helper type that emulates the use of the "sync/atomic.Value"
// struct that's available in Go 1.4 and up.
type atomicValue struct {
value interface{}
lock sync.RWMutex
}
func (av *atomicValue) Store(val interface{}) {
av.lock.Lock()
av.value = val
av.lock.Unlock()
}
func (av *atomicValue) Load() interface{} {
av.lock.RLock()
ret := av.value
av.lock.RUnlock()
return ret
}