//NewLDAP build a new LDAP helper based on config struct given.
NewLDAP build a new LDAP helper based on config struct given.
// NewLDAP build a new LDAP helper based on config struct given .
func NewLDAP(ctx context.Context, cnf *Config, attributes []string) (*HelperLDAP, liberr.Error) {
	if cnf == nil {
		return nil, ErrorEmptyParams.Error(nil)
	}
	return &HelperLDAP{
		Attributes: attributes,
		tlsConfig: libcrt.GetTLSConfig(cnf.Uri),
		tlsMode:   _TLSModeInit,
		config:    cnf.Clone(),
		ctx:       libctx.IsolateParent(ctx),
	}, nil
}
func NewLDAP ( ctx context . Context , cnf * Config , attributes [ ] string ) ( * HelperLDAP , liberr . Error ) { if cnf == nil { return nil , ErrorEmptyParams . Error ( nil ) } return & HelperLDAP { Attributes : attributes , tlsConfig : libcrt . GetTLSConfig ( cnf . Uri ) , tlsMode : _TLSModeInit , config : cnf . Clone ( ) , ctx : libctx . IsolateParent ( ctx ) , } , nil }
NewLDAP build a new LDAP helper based on config struct given.
NewLDAP build a new LDAP helper based on config struct given .
//nolint #staticcheck